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.
Great kata to learn to understand language features in JS.
I have never had so much fun when solving a kata as this.ㅤ♡
I got this question in my Meesho New Grad interview. Lmao, I’m the luckiest person alive. The interviewer was so happy with my solution. He was expecting a C++ answer at first, but I coded it in both C++ and Python (one of their required skills was Python). You should’ve seen his face, lmao.
I just can’t stop laughing — just one day before I was cussing this question, and the next day I’m grateful. HAHAHAHA
Gaps between words can't differ by more than one space.
(This statement feels a bit contradictory.)
The difference between any two gaps should not be more than 1
(Using this phrasing removes the ambiguity and confusion.)
Great kata...
Nevermind, it looks like there was a fork that fixed this.
Can you provide an example of a passing solution that returns a static string? I can't seem to find any.
Hopefully fixed in this fork
Expected output is horrendously underspecified however, so there may be other bugs.
Approved.
No, there is an actual full-stop after
orci, so the sequence of spaces is2-2-1-1, which does not leave enough room foratand another space.Below you can see an excerpt from the description/sample tests in python, I replaced space characters by dots to make it easier to compare. The expected line length is 30 characters.
The sequence of spaces in line (1) is: 2, 2, 2.
The word "at" at the beginning of line (2) could be appended at the end of line (1) if each sequence of 2 spaces would be replace by 1 space, couldn't it?
The order of
expecetdandactualhas been corrected wuth the above fork, but remaining points still stand.https://www.codewars.com/kumite/67b90df78f99752cbe256030?sel=67b90df78f99752cbe256030
Kindly approve.
This comment is hidden because it contains spoiler information about the solution
This one was fun.. but it is borked.
Starting from description (it is confusing) - and ending with tests:
It expects to not allow passing undefined values as arguments. I took that into account of course and added a throw... And the check in my code was done on every function call (as I believe it is reasonable that the deps objects may change on runtime). And.. it failed one of the tests. The correct approach was to not bother at all.
And secondly, it expects that arguments that are not present in the deps objects are... skipped. Completely ruining the order of arguments if some are not present, which makes this pretty useless approach even more useless.
And, of course, back when this kata was created - no such thing as default parameters existed, so it does not take them into account...
Loading more items...