Ad
  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Custom User Avatar

    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

  • Custom User Avatar

    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.

  • Custom User Avatar

    just print the given array and average and your answer in your solution, you will get to know all the test case

  • Custom User Avatar
  • Default User Avatar

    The time is always the same anyway.

  • Custom User Avatar

    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,

  • Custom User Avatar

    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,

  • Custom User Avatar

    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

  • Custom User Avatar

    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,

  • Custom User Avatar

    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,

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution