This function mainly creates an unordered_map , then calls buildTree ( )
def buldTreeWrap ( inn , pre , lenn ) : NEW_LINE INDENT global mp NEW_LINE for i in range ( lenn ) : NEW_LINE INDENT mp [ inn [ i ] ] = i NEW_LINE DEDENT return buildTree ( inn , pre , 0 , lenn - 1 ) NEW_LINE DEDENT