here we are directly taking height = 4 according to the given tree but we can pre - calculate height = max depth in one more dfs
int height = 4 ; preprocess ( height ) ; System . out . print ( " LCA ( 11,8 ) ▁ : ▁ " + LCASQRT ( 11 , 8 ) + "NEW_LINE"); System . out . print ( " LCA ( 3,13 ) ▁ : ▁ " + LCASQRT ( 3 , 13 ) + "NEW_LINE"); } }