We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Don't try to fill the given function, clean the editor and start from scratch , I thought my code has problem and started debugging but the given input to the function is wrong It took me 3 hours to figure it out , to know that value of 'g' is wrong i.e guesses.size().
Hint:
If you have any doubt just think it as dfs and parent marking
if you can't figure it how this is my code See only when you think you have tried hard.
Another Hint: Take 1 as node draw a directed graph and try
code
The Story of a Tree
You are viewing a single comment's thread. Return to all comments →
Don't try to fill the given function, clean the editor and start from scratch , I thought my code has problem and started debugging but the given input to the function is wrong It took me 3 hours to figure it out , to know that value of 'g' is wrong i.e guesses.size().
Hint: If you have any doubt just think it as dfs and parent marking if you can't figure it how this is my code See only when you think you have tried hard. Another Hint: Take 1 as node draw a directed graph and try code
changing the directions while traversing dfs and changing parents. code: