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
This comment is hidden because it contains spoiler information about the solution
Bro, I don't like to use ChatGPT for code. Out of interest, I just asked it to solve this task, and it produced the naive solution that Nicolas proposed below.
It would be O(n log n). This solution is O(n).
Папич?
You can check out the fork that doesn't assume a specific
encode_utf8
implementation and that favors ASCII input.it's 10 times faster than the most popular solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
bouncing_ball(1., 0.5, 0.25)
will return 5 instead of 3 herethis is a thousand times slower than it could be
Loading more items...