Sorting algorithms/Sleep sort: Difference between revisions
Content deleted Content added
→{{header|Rust}}: Update to Rust 0.8 syntax |
Added brainfuck example |
||
Line 71:
782
</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}}==
|