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.
.
In that case the fault is mine. I misunderstood you. Apologies
Running sort twice is unnecessary (it can be done sorting only once, with non-trivial comparer), and also requires the sorting algorithm to be stable. Not all implementations of sort are guaranteed to be stable.
(assuming a stable sort is used)
First sort the string alphabetically (so a normal sort) and after that sort it again according to the sum of the digits.
No I said the opposite of that. I said I think you are already familiar with it.
You already had all the answers, and yet weren't seeing it. I don't know why that is, but all I can do is point at where you have the answer.
I can also ignore that you already have the answer and instead repeat it. I'm aware this is often more appreciated. But I kind of refuse to do that as the method of figuring things out is more important than the answer.
I appreciate that you tried to answer the question but assuming that I'm unfamiliar with the alphabet was completely unnecessary. I asked the question because I was confused not to learn the alphabet. You'd rather not answer the question than do so but make me feel dumb.
Your quote says what to consider after weight so you shouldn't be considering
I suspect you're familiar with alphabetical ordering. Which comes first, zebra or armadillo?
This comment is hidden because it contains spoiler information about the solution
Yes this normal. There are a small number of test case. Your code may simply miss possibilities not included in the tesrs. For example in this kata the test cases do not include any two digit numbers. This could cause an error in your code if you build a string and then try to use join (Python). I made this error in my first attempt.
Got too honed in on a certain approach initially, then remembered the importance of simplicity
This is one of those katas I thought was going to be easy, but then that last test comes up and I'm thinking this may be out of my league :( Congrats to everyone who has solved it thus far!
https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#test-attempt
;)
Is it normal to pass the test but failed the attempt? I believe my solution works and it does pass the test how ever an error pops up when i try to 'attempt the question'
i am trying to solve this but am stuck at the point that the indexOf() method does not separately return the index of values that appear twice..is there any other possible way if i may ask