i solved this problem by calling the dfs twice , is there another solution where i can call the dfs once ??if yes : please share ur ideaelse : tell me it's not a valid solution ;thanks
Can any one provide me with good test Case…please!!.