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.
Because
sort
isn't stable in all of them.First, it's a question not an issue of the kata (notice that 7505 people passed the JS kata; if there were problems somebody else would already said!). Second, the answer is: your code is wrong:-) I strongly doubt that it gives correct answers for all tests on another platform...
Yes, printing the input, in javascript, use
console.log()
https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#print-input
Your code is wrong, you're returning true inside the loop, why?
Rather than post that much code and expect someone to explain why it doesn't work, can you give more info?
Does it work at all, if not what errors do you see in the console?
If it works but only for some cases, which cases does it fail on? Can you provide a test case which your code does not pass?
Giving a bit more info will likely get you a more helpful response.
I found your mistake! Something goes wrong when you split in groups of three. I don't know what's exactly wrong because I'm not that good with regex but the mistake must be somewhere here:
You get following triples:
But the correct ones would be:
You also have to correct mistakes, which I think doesn't work with your code, meaning:
010 -> 000
110 -> 111
etc..
Just ask if you have more question I hope I could help you. Try to implement it strict to the steps in the description and I'm sure you'll make it. :))
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
please post your code with spoiler flag, so I can help you :)