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.
Perhaps you interpreted the question slightly differently, I took it as the ball was being thrown upwards but we were only measuring the position (with some device) every 0.1 s. Therefore, you can still assume the ball to reach a max height at some fraction not at 0.1 s, we just don't have a precise enough measurement to catch this so we're forced to round to 0.1 s because that's the precision of the device.
This is a common limitation for modeling, so I'm confused as to why this isn't a reasonable approach in your view.
But aren't we essentially looking for the time in 10ths of a second that is closest to the apex of the curve of height against time. Since the curve is parabolic if we take the time to reach the highest point when v has deaccelerated to 0 then the nearest 10th of a second either side of it is our recorded answer?
I've not touched calculus in years so my reasoning could be a little off.
calling your method complex was wrong but actually my approach is not weird rather it's true according to the fundamental calculus laws, if you go through the application of derivatives section in calculus you would find that equating first derivative to zero gives you the actual extremum point that may be minimum or maximum (whatever exists),
my solution is a bit lengthy and more inefficient, i agree
Yep, good first point. This solution doesn't answer the question at all.
For the second part, weird to call basic algebra "complex physics" before solving the same problem with calculus.
just print the given array and average and your answer in your solution, you will get to know all the test case
yeah i agree
The time is always the same anyway.
this is fine but a note has been put down there that the maximum height recorded is not necessarily the maximum height reached(as we are checking for every 10th of a second only, not for more smaller fractions), but this code violates this note, it takes the maximum height reached into consideration,
this is fine but a note has been put down there that the maximum height recorded is not necessarily the maximum height reached(as we are checking for every 10th of a second only, not for more smaller fractions), but this code violates this note, it takes the maximum height reached into consideration,
this is fine but a note has been put down there that the maximum height recorded is not necessarily the maximum height reached(as we are checking for every 10th of a second only, not for more smaller fractions), but this code violates this note, it takes the maximum height reached into consideration
this is fine but a note has been put down there that the maximum height recorded is not necessarily the maximum height reached(as we are checking for every 10th of a second only, not for more smaller fractions), but this code violates this note, it takes the maximum height reached into consideration,
this is fine but a note has been put down there that the maximum height recorded is not necessarily the maximum height reached(as we are checking for every 10th of a second only, not for more smaller fractions), but this code violates this note, it takes the maximum height reached into consideration,
This comment is hidden because it contains spoiler information about the solution