You need to sign in or sign up before continuing.×
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.
Storing whole linked list in an array is pointless.
You use all-in-memory structure to walk through light one.
This comment is hidden because it contains spoiler information about the solution
Can someone look at this translation and to verify them?
Thank you :)
Improved!
Thanks guys.
"
value
/array
starts with..." suggest: "first indexes should be[1, 2, 3]
"."Initial array/value should be..." would be better.
If your implementation use
map
function to fill new Array of empty elementsx
is every element, it meansnull
:)This param isn't useful, by is necessary to provide 2nd
index
bymap
notation. It simplifies implementation.This comment is hidden because it contains spoiler information about the solution
I had the same.
Remove
'use strict';
if you set.Clever, but ineffective.
You try to guess
nextBigger
by sorting and comparig arraysnexteBigger - n
times.In the case of
59884848459853
it's 23706 times :)I just add random test to Clojure ver.
if (true) fixed();
Fixed!
You convinced me.
Try now ;)