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.
It's just short, nothing more.
O(n)
should be clever or best practice. Not this! This is awful solution.This comment is hidden because it contains spoiler information about the solution
Where did you check the cube value of each digit?
lol smart but should not be allowed
This comment is hidden because it contains spoiler information about the solution
Loved the use of and operator
data[ptr] = (data[ptr] + 1) & 0xff;
The regex doesn't work if paramatres are set to more than one character.
E.g.
stripUrlParams('www.codewars.com?a=12&a=34');
This should work:
/&?([^?=]+)=[^&]+/g
The more I look at it, the more I like it.
You're perfectly correct. I didn't anticipate that approach when I designed the test cases, I'm afraid, and since the kata is published, I can't change or add them now.
The chance of a random test case catching those solution is also rather small, unfortunately.
From another perspetive, they actually solve the problem as stated in the description, even if that was not my intention. :-)
Thanks for the feedback. :-)
(You have a tight and readable solution, too, btw. Nice!)
We've got a rebel here.
This comment is hidden because it contains spoiler information about the solution
Your solution fails for this test:
isMerge("catodc", "cod", "cat"); // should return false, but yours return true
What a horrible piece of ... kata.
Finally somebody with IIFE solution. I thought I was alone :D
Loading more items...