Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#480 Allow the sort/sortWith methods to sort sparse arrays as well

None
rejected
nobody
None
none
1
2014-06-29
2012-08-25
No

Currently a sparse array (an array containing empty slots in between) cannot be sorted.

It would be great, if sort/sortWith could be changed to allow sorting sparse arrays.

The result could be either a condensed array in sorted order (having all empty slots removed) or the original size, where the sorted items are stored from index 1 on up.

Discussion

  • Rick McGuire
    Rick McGuire
    2014-06-29

    This does not make any sense. The effect of how sparse elements should be handled in
    a sorting context really does not make any sense. This will not be implemented.

     


Anonymous


Cancel   Add attachments