class Solution {
public int largestAltitude(int[] gain) {
int res = 0;
int high = 0;
for(int i = 0; i < gain.length; i ++) {
high += gain[i];
res = Math.max(res, high);
}
return res;
}
}
标签:找到,res,1732,high,int,海拔,gain
From: https://www.cnblogs.com/eiffelzero/p/16906435.html