1. Determine the balanced binary tree. 2. Pattern match 3. Longest consecutive ones
Anonymous
1. You can check if the tree is balanced by using a function that calculates the height of root from the bottom up while propagating up if any subtree is unbalanced!
Check out your Company Bowl for anonymous work chats.