A biker starts at altitude 0. Given an integer array gain of net altitude gains between consecutive points, return the highest altitude reached at any point during the trip (including the start at 0).
Input: An integer array gain of length n.
Output: Integer — highest altitude reached.
Input: [-5,1,5,0,-7]
Output: 1
Explanation: Altitudes: 0,-5,-4,1,1,-6. Maximum = 1.Input: [-4,-3,-2,-1,4,3,2]
Output: 0
Explanation: Altitudes: 0,-4,-7,-9,-10,-6,-3,-1. Max=0 (start).Input: [1,2,3,4,5]
Output: 15
Explanation: Altitudes: 0,1,3,6,10,15. Max=15.n == gain.length1 <= n <= 100-100 <= gain[i] <= 100