Anonymous user
Sorting algorithms/Sleep sort: Difference between revisions
Added brainfuck example
(→{{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}}==
|