Talk:Sort disjoint sublist: Difference between revisions

→‎Indices as collection: I'' modify the task description.
(→‎Indices as collection: Seems fun to me :-))
(→‎Indices as collection: I'' modify the task description.)
 
Line 30:
[7, 0, 5, 4, 3, 2, 0, 6]</lang>
::::::--[[User:Rdm|Rdm]] 20:05, 14 February 2011 (UTC)
 
::::::: Just goes to show... I tried [6,6,6,1,7], and [6,7,6,1,6,1,7] and just assumed ...
::::::: I'll tighten the task description. --[[User:Paddy3118|Paddy3118]] 00:36, 15 February 2011 (UTC)
 
:: I only asked because I couldn't see whether having duplicates and not filtering could guarantee a correct result or not. If I can't see why a property might hold, I suspect it doesn't (an application of the Paranoid Principle). It should be reasonably simple to fix by adding a unique-ing step to the processing of the index list. (Fun problem overall! Short and not quite as obvious as it looks at first glance.) –[[User:Dkf|Donal Fellows]] 00:10, 15 February 2011 (UTC)
Anonymous user