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
Suggestion implemented & made description language agnostic.
Note the list isn't really sequential (the actual sequence for n-digit = 3 in ascending order goes like
100, 110, 111, 112, 113, 114, 115, 116, ...
)I think the description should include the number "100" in the
number_of_duplicate_digits(3)
example.wish I saw this before I spent an hour trying to decide if my math was wrong
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.
Approved by someone
Approved by someone.
Added some
Loading more items...