A biker is going on a road trip with n + 1 points. The biker starts at point 0, where the altitude is 0.
You are given an array gain of length n, where each element gain[i] represents the change in altitude from point i to point i + 1. Your task is to calculate the highest altitude the biker reaches during the trip.
input:
gain = [-5, 1, 5, 0, -7]
Output:
1
Explanation:
The altitudes at the points during the trip are: [0, -5, -4, 1, 1, -6]. The highest altitude is 1.