0

How can I solve this problem, Can you please me suggest some algorithms to solve this problem?

I came to know that hashing solution of this problem can also be used to solve similar problem in tree also.

Answered question