Talk:Order two numerical lists: Difference between revisions

think less, no invent <?= operator.
(very unclear)
(think less, no invent <?= operator.)
Line 5:
But reading the algorithm description: "... and so on, until one of the list has no more elements. If the first list runs out of elements the result is true." It seems that it should return true for two equal lists, since both lists would run out of elements at the same time.
:if the first list is tested first, and the second list is not tested, the effect is that if both are equal, the result will be true.--[[User:EMBee|eMBee]] 02:30, 30 November 2011 (UTC)
::"ordered before" is the familar concept of "less than." For programming anyway, less than always means strictly less than and never less than or maybe equal to. A fix would be to change "If the first list runs out of elements the result is true. false otherwise" to "If the first list runs out of elements ''while there are still elements left in the second'' the result is true. false otherwise." Then you have strictly less than semantics...which could be used to write a stable sort algorithm. &mdash;[[User:Sonia|Sonia]] 04:09, 30 November 2011 (UTC)
 
Whatever is decided, some of the solutions will be incorrect and will need to be changed. --[[User:Spoon!|Spoon!]] 23:55, 29 November 2011 (UTC)
1,707

edits