TecAce interview question

Find the max value in a binary tree, but do it iteratively.

Interview Answer

Anonymous

1 Nov 2017

I used BFS here, I had a queue that pushed the head if it was not null and then continued to do that for each left and right node using a while loop.