int parent [ ] = { 1 , 5 , 5 , 2 , 2 , - 1 , 3 } ;
int parent [ ] = new int [ ] { - 1 , 0 , 0 , 1 , 1 , 3 , 5 } ; int n = parent . length ; System . out . println ( " Height ▁ is ▁ " + tree . findHeight ( parent , n ) ) ; } }