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.
It feels like cheating 😂
What's the time complexity of this solution?
Which part of "There's binary search solution" did you just miss? :P
This comment is hidden because it contains spoiler information about the solution
If you solve it with algorithm this is a binary search problem with O(log n) solution. Considering sum of cubes must not exceed unsigned 64 bit integer, answer is found in 17 steps at worst case.
This answer is O(n) solution. Worst case scenario is at roughly 92682 steps. Are you calling it clever?
Morse code table as JSON
Why do people keep upvoting inefficient implementations as best practice and clever?
Yeah that's bothering me too. O(n) solutions are not that longer than these O(n^2) solutions.