Phone Screen Questions
There is an directed graph with node as below Node { int value; List outBounds; } Multiple nodes can have same value for value Now, Write function to Encode graph to list of integers given the root node . Decode list of integers back to graph and return the root node. List encode(Node root); Node decode(List encodedList>); (Link)
Last updated