https://leetcode.com/problems/find-the-highest-altitude



Runtime: 76 ms, faster than 54.29% of TypeScript online submissions for Find the Highest Altitude.

Memory Usage: 43.4 MB, less than 54.29% of TypeScript online submissions for Find the Highest Altitude.



```typescript
function largestAltitude(gain: number[]): number {
    //8:03
    let height = 0
    let heistest = 0
    for (const num of gain) {
        height += num
        if (height > heistest) {
            heistest = height
        }
    }
    return heistest
    //8:05
};
```
