construct a tree
Node root = newNode ( 1 ) ; root . left = newNode ( 2 ) ; root . right = newNode ( 3 ) ; root . left . left = newNode ( 4 ) ; root . right . left = newNode ( 5 ) ; root . right . right = newNode ( 6 ) ; root . right . left . right = newNode ( 7 ) ; root . right . right . right = newNode ( 8 ) ; root . right . left . right . left = newNode ( 9 ) ; root . right . right . right . right = newNode ( 10 ) ; root . right . right . right . right . left = newNode ( 11 ) ; int result = maxOddLevelDepth ( root ) ; if ( result == Integer . MAX_VALUE ) System . out . println ( " No ▁ leaf ▁ node ▁ at ▁ odd ▁ level " ) ; else { System . out . print ( result ) ; System . out . println ( " ▁ is ▁ the ▁ required ▁ depth ▁ " ) ; } } }