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.
1 comes before 2 as strings, like a comes before b. The order they have in the original string doesn't matter.
C#
Little confused on the 2nd test case and how it is correct according to directions and output of my code, I'm probably mistaken considering others have finished the C# Kata.
The 2nd test case states that the following:
2000 10003 1234000 44444444 9999 11 11 22 123
should return:
11 11 2000 10003 22 123 1234000 44444444 9999
However, I don't understand how this could be the case. The sum of digits in 2000 is 2 and the sum of digits in 11 is 2. 2000 comes before 11 in the original string passed in, and because of this 2000 in the returned string should come before 11. I think I am mistaken on how the alphabetization is supposed work to especially since other people have passed this Kata.
Thanks for the fun Kata!
This comment is hidden because it contains spoiler information about the solution
Getting same error. After outputting info to console when index of didn't work it showed the test city name as Caracas which isn't in the string passed in so how could it possibly work, getting -1 from IndexOf? I think something is wrong with random test cases. Works fine for test but attempt seems to pass in wrong town names with defualt data parameter.