Order two numerical lists: Difference between revisions

clarification?
(removed "stable sort" part: it's a misnomer at best. Discuss and clarify before adding it back.)
(clarification?)
Line 4:
The function should accept two lists as arguments and return <code>true</code> if the first list should be ordered before the second, and <code>false</code> otherwise.
 
The order is determined by [[wp:Lexicographical order#Ordering of sequences of various lengths|lexicographic order]]: Comparing the first element of each list. If the first elements are equal, then the second elements should be compared, and so on, until one of the list has no more elements. If the first list runs out of elements the result is <code>true</code>. if the second list or both run out of elements the result is <code>false</code> otherwise.
=={{header|C++}}==
The built-in comparison operators already do this:
Anonymous user