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
I think the description should include the number "100" in the
number_of_duplicate_digits(3)
example.Description is incorrect for JavaScript. The tests always require two decimals, even for 0 and 1, which directly contradicts the description. In addition, the tests expect strings instead of numbers.
The easiest way to see the difference is to do both solutions for some smaller inputs by hand.
If you're confused about the function you've used, try to write it out as a loop and compare the differences.
JavaScript fixes
Resoved issues (at least for JS): 1, 2, 3, 4, 5
The array size is known and fixed. This runs in O(1).
Your solution is built around specific test cases. Try to take a more generalized approach.
Fixed
Fixed in Java, Crystal, and R. If there are any other languages that generate tests with less than 4 numbers, let me know.
Fixed the Java tests so they no longer generate incorrect ones.
Added some
As this is not a performance kata, I feel like the random tests are too hard. Several solutions time out and most solutions take more than 7 seconds to run.
I'd keep the random tests in line with other languages. For example, Java and Python have 40 tests with a 1-8 letter word.
The description fails to mention that the arrays in the solution should only contain unique values.
This comment is hidden because it contains spoiler information about the solution
Many issues in JavaScript:
Loading more items...