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

Added 11l
(Add CLU)
(Added 11l)
Line 14:
Write the function even if your language has a built-in function for it.
<br><br>
 
=={{header|11l}}==
<lang 11l>F sorted_str(s)
DefaultDict[Char, Int] d
L(c) s
d[c]++
V r = ‘’
L(k) sorted(d.keys())
r ‘’= k * d[k]
R r
 
print(sorted_str(‘The quick brown fox jumps over the lazy dog, apparently’))
print(sorted_str(‘Is this misspelling of alphabetical as alphabitical a joke ?’))</lang>
 
{{out}}
<pre>
,Taaabcdeeeefghhijkllmnnoooopppqrrrsttuuvwxyyz
?Iaaaaaaaabbcceeefghhhiiiiiijkllllllmnoopppsssssttt
</pre>
 
=={{header|Action!}}==
1,453

edits