1732. 找到最高海拔
8/7/23Less than 1 minute
1732. 找到最高海拔
简单class Solution {
public int largestAltitude(int[] gain) {
int res = 0;
int high = 0;
for (int i : gain) {
high += i;
res = Math.max(high,res);
}
return res;
}
}