We want to find an algorithm for finding the deepest node of a binary tree.
My idea is to use BFS (Breadth-first search) and while visiting each node we will initialize it's node.dvalue(which will indicate how much far is node away from the source(root)).
When my algorithm will terminate, I will find that node for whose dvalue is maximum, and that will give me node with the highest depth.
Is my above-suggested algorithm correct?