Function to find the height of the tree
static Node BuildKaryTree_1 ( int [ ] A , int n , int k , int iN ) { int height = ( int ) Math . Ceiling ( Math . Log ( ( double ) n * ( k - 1 ) + 1 ) / Math . Log ( ( double ) k ) ) ; ind = iN ; return BuildKaryTree ( A , n , k , height ) ; }