Im trying to put to an array the deepest path on a BST using a recursive algorithm, and im getting several difficulties... because the only thing that i get is the size of the longest path(equivalent to the height), and i cant put in the array the values regarding to the height of the BST...
Any help?
Sorry, I didn't expose the problem in the entire way. The only thing that I know to do this algorithm is this signature:
//each node has 3 references : value, left and right
private int [] deepestPath(Node root){ ...}
(I can use aux methods)