You are viewing a single comment's thread. Return to all comments →
I have basically the same algo. But I'm getting 2 as answer.
I tried with this test and I got a wrong answer.
So my code is wrong, which is good so I need to update it.
Test 6 5 3 2 4 1 6
Should give you 3 as answer.
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Height of a Binary Tree
You are viewing a single comment's thread. Return to all comments →
I have basically the same algo. But I'm getting 2 as answer.
I tried with this test and I got a wrong answer.
So my code is wrong, which is good so I need to update it.
Test 6 5 3 2 4 1 6
Should give you 3 as answer.