Driver Code
public static void main ( String args [ ] ) { int k = 45 ; BinaryTree tree = new BinaryTree ( ) ; tree . root = new Node ( 1 ) ; tree . root . left = new Node ( 2 ) ; tree . root . right = new Node ( 3 ) ; tree . root . left . left = new Node ( 4 ) ; tree . root . right . left = new Node ( 5 ) ; tree . root . right . right = new Node ( 6 ) ; tree . root . right . left . right = new Node ( 7 ) ; tree . root . right . right . right = new Node ( 8 ) ; tree . root . right . left . right . left = new Node ( 9 ) ; tree . root . right . right . right . right = new Node ( 10 ) ; tree . root . right . right . right . right . left = new Node ( 11 ) ; System . out . println ( tree . depthOfOddLeaf ( tree . root ) + " ▁ is ▁ the ▁ required ▁ depth " ) ; } }