Condition to check if there is only one element in the array
if ( beg == end ) : NEW_LINE INDENT tree [ index ] . value = a [ beg ] NEW_LINE tree [ index ] . max_set_bits = setBits ( a [ beg ] ) NEW_LINE DEDENT else : NEW_LINE INDENT mid = ( beg + end ) // 2 NEW_LINE DEDENT