Questions on the sorting/ordering functions of Mathematica (Sort, SortBy, Ordering, etc.).

learn more… | top users | synonyms (1)

14
votes
4answers
406 views

How can we implement “Sleep Sort”?

Inspired by Implement Sleep Sort: Sleep Sort is an integer sorting algorithm I found on the Internet. It opens an output stream, and for each input numbers in parallel, delay for the number ...
8
votes
2answers
239 views

How to generate Intervals from a given list?

If I have a list list={3,7,4,5,1} how to get the List of Intervals /Ranges result = {{1,3},{3,4},{4,5},{5,7}}