Append to the list of greater values
if ( greaterHead == None ) : NEW_LINE INDENT greaterLast = greaterHead = head NEW_LINE DEDENT else : NEW_LINE INDENT greaterLast . next = head NEW_LINE greaterLast = head NEW_LINE DEDENT head = head . next NEW_LINE