Sort numbers lexicographically: Difference between revisions
Content added Content deleted
m (→{{header|APL}}) |
m (→{{header|APL}}) |
||
Line 49: | Line 49: | ||
Dyalog APL (with origin 0, ⎕IO←0) |
Dyalog APL (with origin 0, ⎕IO←0) |
||
{{⍵[⍋⍵]}⍕¨1+⍳⍵} 13 |
{⍎¨{⍵[⍋⍵]}⍕¨1+⍳⍵} 13 |
||
1 10 11 12 13 2 3 4 5 6 7 8 9 |
1 10 11 12 13 2 3 4 5 6 7 8 9 |
||
{{⍵[⍋⍵]}⍕¨1+⍳⍵} 21 |
{⍎¨{⍵[⍋⍵]}⍕¨1+⍳⍵} 21 |
||
1 10 11 12 13 14 15 16 17 18 19 2 20 21 3 4 5 6 7 8 9 |
1 10 11 12 13 14 15 16 17 18 19 2 20 21 3 4 5 6 7 8 9 |
||