Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
A lot of issues:
does nothing
You are only sorting ascendingly w.r.t the summation of digits, but not sorting them alphabetically in cases of same summations.
The output should be a string of original element, separated by a space. Not the key-value pair of original element and its summation.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
share code if you done it correctly please
already mentioned in kata title and task
This comment is hidden because it contains spoiler information about the solution
Comment is unclear and unhelpful.
This comment is hidden because it contains spoiler information about the solution
i mean, the obvious thing to do would be to loop through the sum of the weight digits and order them by value and if you find any case where you have duplicate values, then order the duplicate values by their "original numbers" alphabetically. example:
"90" = 9 + 0 = 9. "180" = 1+8+0= 9. since both values(sum of the original weight) are 9,you sort them by their original weights instead of values, which is: "90 < 180" (in this case,is false because 90 is greater than 180 alphabetically. ) then swap their positions in the string or sort their positions how you deem fit.
keep at it! I love feeling dumb myself, that's how I know I'm learning something :)
Still: Thank you. :)
Thank you. :p