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.
This comment is hidden because it contains spoiler information about the solution
fiel copia de la de arriba jajajajajaj
There might be an equation somewhere that you can use to calculate the distance between two points
Not quite sure where to start with this one.
Not a kata issue, closing - and please double-check your issues before you raise them :)
In javascript the float "1.0" will be printed as just 1, the last test case never will be achieved
39 => 3.9
9 => 0.9
10 => 1 XXXX
I can't figure out how the distance is being calculated :C Any tips=
Thank you so much for your explanation and the function explaining it. I tested it and it worked with my assumptions in the way your functions explained. I shall look more into bitwise operations as well.
This comment is hidden because it contains spoiler information about the solution
Now I can read it: does nobody notice the medium random tests in JS have a zero more than in Python? Josh even said so!
Not that it matters though.
Node 8.x
consistently fails my solution, even with1e5
;Node 14.x
consistently passes my solution, even with1e6
.For my naive solution, this immediately let me pass ..
I know. I don't know if they did that before or after the JS translation, and which language version they ranked.
i do not think it significantly improved performance either. i tried the solution from the top message above who reports a time out and it is still too slow. but it uses
Array.splice()
which i reckon is rather expensive because it must shift the array indices to the right ofidx
This comment is hidden because it contains spoiler information about the solution
the Node version is
8.x
perhaps14.x
would be faster ? i just enabled it, if you want to tryIf it's
7kyu
, IMO more or less any naive solution should pass, in any language.There is not even a good reason for tests with millions of numbers, or numbers of millions. What does that add, to a
7kyu
kata ?!?Yes, I think this issue is an
Issue
.Loading more items...