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.
As well, not optimised in most of the browsers, can exit with Maximum call stack size exceeded error
Long to enumerate all the variants
If you have fourbonacci, would you add another if-condition?
It's not optimised in all browsers and can exit with Maximum call stack size exceeded error
It's not readable and you cannot easily debug it
This comment is hidden because it contains spoiler information about the solution
Slow as it's recursive
Yet not all recursive code is optimized well
This comment is hidden because it contains spoiler information about the solution
It's slow, you can do
O(1)
algorithmIt's
O(N^2)
whereN
- number of letters instr
formatTime
is created every time you callG964.stat
You can make it
static
as wellThis comment is hidden because it contains spoiler information about the solution
How does that work?
I don't understand
This comment is hidden because it contains spoiler information about the solution
Recreating a lot of
string
sWorking longer with strings like:
{([{([...])}])}
For the example, it takes
N / 2
times to createstring
withs.replace
As thinking of the implementation of
String.prototype.replace
it hasO(N^2)
complexityYou can do better
Best solution!
Looks short and precise!
Loading more items...