Hi,
I just attempted a FB mock phone interview. One of the questions was "Clone Graph" but it was different compared to the actual LC "Clone Graph" in that the result expected was just an adjacency list - NOT the return of the root node of the clone.
I did exactly the same and my new cloned adj list (list of lists) is exactly like the original - however, I failed the test because there was no way the auto-tester could compare that the result adjacency list was coming from the new clone object created! It kept failing the isCopy. Could you please take a look at this problem? THIS IS NOT THE SAME "Clone Graph" problem - the one in FB Mock interview is different because it is asking for different result.
Is this is a trick question? How are we supposed to solve this problem if we are only asked to return adj list from new cloned graph?
ALSO, I couldn't find the Mock interview version of the "Clone Graph" question afterwards
because I wanted to see what is going wrong in my solution. I only got the original "Clone Graph"
Can someone please provide a copy of the FB interview question clone graph and give me a hint as to how one is supposed to prove that the new adj list is coming from clone graph when you cannot add the new cloned nodes themselves? The object compare in the auto-tester is never going to work for adj list returned from new cloned graph ofcourse !!
ADDENDUM: I also noticed other errors in the question, such as the input was supposed to be adjacency list, but actually the "template" offered only "node" as input. I was prepared to "buildGraph" to take care of bunch of disconnected nodes shown in examples BUT the whole question was incomplete and incorrect in so many aspects and an equally mismatched auto-grader to go with it. I would like to know what is really being expected here (this will be my first interview of this sort and so I want to understand these nuances one might face)
Please help.