You are given an integer array gain where gain[i] represents the net change in altitude after traveling from point i to point i + 1. The altitude at the starting point is
Compute and return the highest altitude reached at any point during the trip, including the starting point.
Constraints:
n == gain.length
You are given an integer array gain where gain[i] represents the net change in altitude after traveling from point i to point i + 1. The altitude at the starting point is
Compute and return the highest altitude reached at any point during the trip, including the starting point.
Constraints:
n == gain.length