Sort the letters of string in alphabetical order: Difference between revisions
Content added Content deleted
(K) |
(add RPL) |
||
Line 1,367: | Line 1,367: | ||
Output: aaaeeefgggggiilmmnnnooprrrrruv |
Output: aaaeeefgggggiilmmnnnooprrrrruv |
||
done... |
done... |
||
</pre> |
|||
=={{header|RPL}}== |
|||
{{works with|HP|48G}} |
|||
≪ { } |
|||
1 3 PICK SIZE '''FOR''' j |
|||
OVER j DUP SUB + '''NEXT''' |
|||
SWAP DROP |
|||
SORT ∑LIST |
|||
≫ '<span style="color:blue">STRORT</span>' STO |
|||
"The quick brown fox jumps over the lazy dog, apparently" <span style="color:blue">STRORT</span> |
|||
{{out}} |
|||
<pre> |
|||
1: " ,Taaabcdeeeefghhijkllmnnoooopppqrrrsttuuvwxyyz" |
|||
</pre> |
</pre> |
||
Line 1,400: | Line 1,415: | ||
,Taaabcdeeeefghhijkllmnnoooopppqrrrsttuuvwxyyz |
,Taaabcdeeeefghhijkllmnnoooopppqrrrsttuuvwxyyz |
||
</pre> |
</pre> |
||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
Well, we'll write a function for a bubble sort which we don't have in Wren-sort because it's normally much slower than the other methods. However, it's fast enough here. |
Well, we'll write a function for a bubble sort which we don't have in Wren-sort because it's normally much slower than the other methods. However, it's fast enough here. |