Solutions
- Maintain a node dictionary that stores all constructed node.
- For each new node introduced, loop through all its neighbours to find the node corresponding to the neighbour.
Need to use helper function.
PREVIOUSTop K Frequent Elements
NEXTCourse Schedule