Sorting algorithms/Bogosort: Difference between revisions

add BQN
m (syntax highlighting fixup automation)
(add BQN)
Line 828:
383150 shuffles required to sort 10 items.
</pre>
 
=={{header|BQN}}==
Requires the <code>_while_</code> idiom because the recursive version <code>{(π•Šπ•©βŠΛœβ€’rand.Dealβˆ˜β‰ )⍟(π•©β‰’βˆ§π•©)𝕩}</code> quickly runs out of stack depth.
 
<syntaxhighlight lang="bqn">_while_←{π”½βŸπ”Ύβˆ˜π”½_𝕣_π”Ύβˆ˜π”½βŸπ”Ύπ•©}
Bogo←{π•©βŠΛœβ€’rand.Deal≠𝕩}_while_(β‰’βŸœβˆ§)</syntaxhighlight>
 
=={{header|Brat}}==
236

edits