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
This comment is hidden because it contains spoiler information about the solution
Needs fixes for method accessor - methods that are merely accessed but not called should not be saved into the history array.
Try poking around the runtime environment.
This comment is hidden because it contains spoiler information about the solution
I think a chance for Math.random() to be 0 is exceptionally rare though (maybe 1 in a billion) but changed it to your suggestion nonetheless. I also make the test cases more semantic and more conforming to the ES6 standard.
I changed back to the original author's solution with 2 space indents.
Sorry, my IDE applies 4 spaces to the solution files. I'm going to find the OG reference solution and revert to it if there's any difference.
Update: the reference solution is still identical to the OG, probably except the line indentation.
Fixed.
Upgraded to 14.x.
Done. The feedback now explicitly declares that the algorithm must be slower than linear time (are the 2 kyu algorithms linear time? I haven't managed to think of the exact time complexity, please fix if it's wrong)
Hob, you might consider adding random tests.
Tip for those who are stuck in the random questions: don't mutate the array of votes. (should be mentioned in the description)
I made the arrays immutable instead with Object.freeze(). Is it enough?
Added missing sample test cases. Thank you!
Loading more items...