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.
I am also interested in this rationale.
You can start looking at this pages to learn about Big O notation and measure it on your code:
https://www.freecodecamp.org/news/big-o-notation-why-it-matters-and-why-it-doesnt-1674cfa8a23c/
https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation
https://www.khanacademy.org/computing/computer-science/algorithms#asymptotic-notation
https://craigndave.org/wp-content/uploads/2020/09/big-o-notation-cheat-sheet.pdf
The kata is bad written because it aims to you to calculate the highest height that the device will measure but the
real answers are the total distance of the ball since it is throw until it reaches the floor, rounded to the tenth of
a second.
That's why you see this strange results. As I see it, it has nothing to do with aritmethic precision.
Please, g964, correct the description to make it more clear.
That was the problem, and...
I did it soo complicated, it is a lot easier that what I was doing.
No, I didn't. And maybe that's just the problem.
Man, I wasn't able to complete it. It fails on test 116 or 115. I don't know for sure, but, I can't see the log so I can't know
what array was used, what init input was used and what function was used.
All I know is that it should be [18, 414, 2070, 26910, 26910, 107640] but mine is [18, 414, -2070, -26910, 26910, 107640]
No yet
@g964 I said before I can't know why the test are failing but I miss the most obvious way to do it: jus't print the input on the the function, not on the test phase..
Sorry for comment here, I don't find the reply button.
I can't. It stucks when I attempt to submit my solution.
I have the same problem, but with the test #120.
I have no idea of the inputs, I have no idea of the function that is being used.
Anyways, it is working with other test cases, so it is harder to find why it fails.
Edit: I did it on elixir.
I think it's easier to try your code on your computer throught NodeJS. Once your code is debugged and it works you can copy & paste your solution.
Awesome solution. You shock me because it is trivial math, but I did not see it.