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

Content added Content deleted
Line 49: Line 49:
Given the alphabet as an ordered list of characters. Pass through the string once counting the number of occurrences of each character. Pass through the alphabet once outputting the corresponding character the appropriate number of times.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:44, 26 July 2021 (UTC)
Given the alphabet as an ordered list of characters. Pass through the string once counting the number of occurrences of each character. Pass through the alphabet once outputting the corresponding character the appropriate number of times.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:44, 26 July 2021 (UTC)
:Fair point but (not that this task merits such attention to detail) I wonder what the output of "baNAnaBAnaNA" should be...
:Fair point but (not that this task merits such attention to detail) I wonder what the output of "baNAnaBAnaNA" should be...
:Just to be awkward, I'm going with "aAaAaAbNnnN". --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 16:26, 26 July 2021 (UTC)
:Just to be awkward, I'm going with "aAaAaAbBNnnN". --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 16:26, 26 July 2021 (UTC)


== Slacksort ==
== Slacksort ==