Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT arr = [ 5 , 1 , 4 , 4 , 5 , 9 , 7 , 13 , 3 ] NEW_LINE n = len ( arr ) NEW_LINE x = 4 NEW_LINE root = None NEW_LINE for i in range ( n ) : NEW_LINE INDENT root = insert ( root , arr [ i ] ) NEW_LINE DEDENT print ( " Rank ▁ of " , x , " in ▁ stream ▁ is : " , getRank ( root , x ) ) NEW_LINE x = 13 NEW_LINE print ( " Rank ▁ of " , x , " in ▁ stream ▁ is : " , getRank ( root , x ) ) NEW_LINE x = 8 NEW_LINE print ( " Rank ▁ of " , x , " in ▁ stream ▁ is : " , getRank ( root , x ) ) NEW_LINE DEDENT