function to insert elements of the tree to map m
def insertToHash ( root ) : NEW_LINE INDENT if ( root == None ) : NEW_LINE INDENT return NEW_LINE DEDENT insertToHash ( root . left ) NEW_LINE s . add ( root . data ) NEW_LINE insertToHash ( root . right ) NEW_LINE DEDENT