Sorting algorithms/Sleep sort: Difference between revisions

Content added Content deleted
(→‎{{header|Rust}}: Update to Rust 0.8 syntax)
(Added brainfuck example)
Line 71: Line 71:
782
782
</pre>
</pre>


=={{header|Brainfuck}}==
<lang C>
>>>>>,----------[++++++++
++[->+>+<<]>+>[-<<+>>]+++
+++++[-<------>]>>+>,----
------<<+[->>>>>+<<<<<]>>
]>>>[<<<<[<<<[->>+<<[->+>
[-]<<]]>[-<+>]>[-<<<.>>>>
->>>>>[>>>>>]<-<<<<[<<<<<
]+<]<<<<]>>>>>[>>>>>]<]
</lang>
Not exactly 'sleep' sort but it is similar, it inputs an array and in each iteration reduces elements by 1 and prints the number if result is 0.

Input: 1539\n

Output: 1359


=={{header|C}}==
=={{header|C}}==