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.
This comment is hidden because it contains spoiler information about the solution
Congrats! The shortest solution.
super logic
Ashamed that I didn't realize it was this simple...
all occurrences
will this solution delete all the repetitions of the letters in text (e.g. "a" found 2,3.. n times) or delete only one occurence?
thank you
I can see some of your solution, I do not knwo if it is the most recent one. And yes, I can see a bug in it, which would cause the crash.
As a first step to diagnose the issue, I would recommend recreating the failing test case in your local IDE and debugging trough it. Use your IntelliJ, Eclipse, NetBeans, or whatever is what you use for coding on your computer, and run your solution with the input which Codewars says you can;t handle. Debug through your code, find the place where it crashes.
You can also visit CW Discord and
#help-solve
or#java
channel.Now fixed.
Approved.
Oh, never mind, I misread! Have changed the test logs in the fork to report test input, too.
Seems like that would duplicate the existing output from the test harness, no? The logs are already in the following form:
Just return the numbers: expected <solution return value> to equal <expected return value>
.Looks good to me. Just a remark: it's better practice to provide the input to user for failed tests (something like
failed test with value = ..., expected ... but got ...
).Pursuant to this issue:
https://www.codewars.com/kata/55b051fac50a3292a9000025/discuss#64d41c95c734e70031455390
I've published a fork which replaces the (frankly ridiculous) JS random test generator with one which does not generate test cases greater than
Number.MAX_SAFE_INTEGER
. While requiring users to useBigInt
to correctly handle larger inputs would be better overall and more in line with other languages, doing so would invalidate the vast majority of existing JS solutions so I've chosen not to.https://www.codewars.com/kumite/64d435116fad180037ece9d4?sel=64d435116fad180037ece9d4
Would appreciate review/feedback.
This comment is hidden because it contains spoiler information about the solution
Loading more items...