Jump to content

Sort the letters of string in alphabetical order: Difference between revisions

add RPL
(K)
(add RPL)
Line 1,367:
Output: aaaeeefgggggiilmmnnnooprrrrruv
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>
 
Line 1,400 ⟶ 1,415:
,Taaabcdeeeefghhijkllmnnoooopppqrrrsttuuvwxyyz
</pre>
 
=={{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.
1,150

edits

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