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.
the number should match one of the awesomePhrases to be interesting. If you add 2 to 1335, it becomes 1337, which is one of the awesomePhrases
If your language is Javascript, then type-console.log(integers) at the very beginning of your function; as the fist line of your code or just print the value at the beginning to see which arrays are being passed into your function.
Number is almost interesting if it is within two miles range of its interesting counterpart. 1335 qualifies as almost awesome 1337 then.
I am just a little confused with the last example given in the instructions of this kata. Can anyone explain to me why
1335
is "almost interesting"? Is it because, it's one digit away from a palindrome? The example here states that it's nearing the provided awesome phrase, but the thing is1335
is still two increments far from "interesting", and so it's a "boring" number, right? Or did I misunderstand what "almost interesting" means?I would really apreciate extra elboration.
Thanks for drawing attention to this corner case!
I think this is a little strange too. I mean it's okay to have 0 as the increment of 9 in incrementation, but then what's the incremenet of 0? And it's okay to have 0 as the decrement of 1 in decrementation, but then what's the decrement of 0 again? Shouldn't this be 9???! To me, this looks a little strange. I think, the logical sequential order of digits is not obvious.
Anyways, cool kata!
Is there any way to view the tests that run when pressing "Attempt". I am using Java, and passing all tests, however when pressing "Attempt" I am getting an ArrayIndexOutOfBoundsException and I understand why. However, I can't see that test case that fails, and this is bothering me. Unforunately, the stacktrace only points to the line where the exception is occuring but not at which given value.
If you're using the Java, then I think you should just change the used JDK version. You can do that in a dropdown list at the top.
Having here the same issue. Have you been able to resolve yours? And if so, would you like to discuss it in a private channel or something please so that we don't spoil the solution?
It's fine. Practice makes perfect. Just keep practicing.
I think it's a pretty good, concise and readable solution. The task doesn't state that anagrams are case-insensitive. I would only argue that it returns an iterator instead of a list. But casting the returned value to a list solves the issue.