Dutch national flag problem: Difference between revisions

Content added Content deleted
(Added Uiua solution)
Line 3,958: Line 3,958:
0 OK, 0:858</pre>
0 OK, 0:858</pre>


=={{header|Uiua}}==
Steps:
# Carefully pick the symbols to give the required order.
# Assume Kai is better at writing algorithms than I am.
<syntaxhighlight lang="uiua">
⊸⊏⊸⍏[⍥(⊡⌊×3⚂"RWb")30] # Build it, sort it.
⟨"oops"|"sorted"⟩≍⇡⧻⟜⍏. # Print it, confirm it.
</syntaxhighlight>
{{out}}
<pre>
"RRWWWRbbWRWWRRWWbbbRWbWWWRbRbb"
"RRRRRRRRRWWWWWWWWWWWWbbbbbbbbb"
"sorted"
</pre>
=={{header|UNIX Shell}}==
=={{header|UNIX Shell}}==
{{works with|Bash}}
{{works with|Bash}}