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.
Given a list of the characters "R", "G", and "B", determine the least number of characters you must remove in order to make a list in which no two neighboring characters are the same. Hope this helps.
Can someone explain the kata in different words?
This Kata uses Node version 8.1.3 which doesn't support trimEnd, try trimRight instead :)
This is a question for the codewars crew. Why isn't String.prototype.trimEnd supported for JavaScript?
It's the same:
If the passed in function returns true for none of the array elements, then your function returns true
If the passed in function returns true for any of the array elements, then your function returns false
This comment is hidden because it contains spoiler information about the solution
The description is difficult to follow.
Wow. This was fun. I came up with a solution i was proud of then looked at the answers... LOL! My solution, while it works, was complicated. I'm going to do it again. Thanks for posting this one
I haven't tried to solve this yet. Just came here to say that the savings on the whiskey would not cover the cost of the holiday. You'd just have spend a whole lot more money on said holiday. Now to solve it.
Solved this without fully understanding the problem. Looked at the number of cuts and the resulting number of cubes and found a pattern that just happened to solve the kata. I'm not sure if this one is 8kyu worthy or not. In some ways it is because it's simple math operations. In other ways it's not because it's not to easy to determine what those math operations are.
Thanks for posting this kata. The description has too much information. The solution to this problem is in the description.
s
I figured it out.
We can't read your mind, please, post your code so we can check it. Mark your post as having spoiler content too.
The cheat test specifically.
Loading more items...