leaf node
if low == high : NEW_LINE INDENT if arr [ low ] > x : NEW_LINE INDENT tree [ ind ] = arr [ low ] NEW_LINE DEDENT else : NEW_LINE INDENT tree [ ind ] = 0 NEW_LINE DEDENT return NEW_LINE DEDENT mid = ( high - low ) / 2 + low NEW_LINE mid = math . floor ( mid ) NEW_LINE mid = int ( mid ) NEW_LINE build_tree ( arr , tree , 2 * ind + 1 , low , mid , x ) NEW_LINE build_tree ( arr , tree , 2 * ind + 2 , mid + 1 , high , x ) NEW_LINE