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.
I dont like using ternary operators, makes the code difficult to read.
share code if you done it correctly please
already mentioned in kata title and task
I wish I had thought of this.
Nice one.
Consider the following steps:
5 times to the West and 6 times to the East, if at the tenth step he is at node zero, this should satisfy the condition, correct or not, this hasn´t been explicitly stated by the author of this kata so im unsure about it.
Damn, this is some clever code.
Nice one.
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 :)
should not be 5
Honestly, felt a bit too easy for a kyu5 challenge.
Loading more items...