Pls can you help me debug the code.It was asked to find the shortest distance b/w 2 nodes of a tree whose bfs traversal is 1,2,3,4.........ans so on.The data values of the node can range upto 1e9

Pls help me to debug the following code: