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
i agree, reading correct helps a lot here.
even with the 1200ms timeout problem
Usually I think codewarriors add what is needed and lots of guys passed the kata as it was and nobody complained.
I just added "#include cmath". Thanks!
C++ sample test is broken. Throws errors.
For example:
results in
Did you forget to
#include <cmath>
?I just added "#include cmath".
C++ sample test is broken. Throws errors.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
195 guys passed the kata out of 1415. I'm very sorry for you.
C++ solution isnt working. Keeps throwing errors. Cannot solve this. Terrible question description as well. Downvoting.
The description of this kata tries to speak for all its language versions (currently C++, C#, and JavaScript). Please read "array" as "indexable data structure", i.e.
std::vector
in C++, array in C#,Array
in JavaScript.Regarding your second point: We are really working with sorted arrays (
std::vector
s in C++). Look at the test cases.The name of this kata should be changed. While vectors represent arrays, we're not working with sorted arrays. Nor are we even working with sorted vectors. The question contains arbitrary size vectors with arbitrary number distribution. This should be clarified via the title and description. It also helps users create a focused solution since they dont have to interpret the definition of the kata.
Maybe the problem is not the performances of the loop/code, but an edge case the provoke an infinite loop...
("Edge cases"... g964 play A LOT with those...)
Exactly this same. My code runs 0.016 seconds for 20000+ bounces in my shell, anyone having any ideas?
I use the while loop in which I multiply height by bounce.
while height > window:
There's a small hint in the kata about how you determine the count. Read carefully and understand. I didnt understand why my code wasnt correct and i reread and the light bulb turned on.
Loading more items...