Talk:Sort disjoint sublist: Difference between revisions

m
Line 16:
:::::I confirmed that the Python-type algo's aren't upset by repeated terms - it just gives rise to extra, redundant work. You do, however have to eventually sort the indices and I think that this should be part of any correct answer that uses this type of algorithm rather than the Go-type algo. But even if duplicates did matter, I would read the task as ''not'' giving you duplicates. --[[User:Paddy3118|Paddy3118]] 19:49, 14 February 2011 (UTC)
 
::::::Except, python's algorithm can be upset by repeated terms:
::::::Yes they are:
::::::<lang python>>>> def sort_disjoint_sublist(data, indices):
... indices = sorted(indices)
6,962

edits