Jump to content

Knuth shuffle: Difference between revisions

(Added Uiua solution)
Line 5,216:
=={{header|Uiua}}==
{{works with|Uiua|0.10.0-dev.1}}
Build pairs of indexes to be swapped then apply these as a fold.
<syntaxhighlight lang="Uiua">
◌⍢⊃(↘1⍜⊏⇌)(⍜⊏⇌⊟⌊×⚂.⊢)(>0⧻⊟⌊×⚂.)⇌↘1⇡⧻. ⇡10
</syntaxhighlight>
 
85

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.