Competitive-Programming-and-Contests-VP-Solution

The repository that contains all solutions made for the course Competitive Programming and Contests by the University of Pisa

View the Project on GitHub

The Monkey and the Oiled Bamboo

Solved Solution Time :clock11:
:construction: Subtractions ? ms
:construction: Sort ? ms
:heavy_check_mark: Bisection 0.040 ms

Solution or Solution discussion

The solution that is completed work with the bisection method, in particular, the solution use two-pointer and for each element check if the Monkey can jump to achieve the Bamboo.

The time complexity of the solution is O(N) and the space complexity is O(1).