Function to do all preprocessing
preProcessing ( root , N ) ; System . out . println ( " Dist ( 4 , ▁ 5 ) ▁ = ▁ " + findDistance ( 4 , 5 , 2 * N - 1 ) ) ; System . out . println ( " Dist ( 4 , ▁ 6 ) ▁ = ▁ " + findDistance ( 4 , 6 , 2 * N - 1 ) ) ; System . out . println ( " Dist ( 3 , ▁ 4 ) ▁ = ▁ " + findDistance ( 3 , 4 , 2 * N - 1 ) ) ; System . out . println ( " Dist ( 2 , ▁ 4 ) ▁ = ▁ " + findDistance ( 2 , 4 , 2 * N - 1 ) ) ; System . out . println ( " Dist ( 8 , ▁ 5 ) ▁ = ▁ " + findDistance ( 8 , 5 , 2 * N - 1 ) ) ; } }