Finish binary tree structure and find max depth