Golang-solution
\nfunc largestAltitude(gain []int) int {\n\tvar max, alt int\n\tfor _, g := range gain {\n\t\talt += g\n\t\tif alt > max {\n\t\t\tmax = alt\n\t\t}\n\t}\n\tretur
```\nfunc largestAltitude(gain []int) int {\n\tvar max, alt int\n\tfor _, g := range gain {\n\t\talt += g\n\t\tif alt > max {\n\t\t\tmax = alt\n\t\t}\n\t}\n\treturn max\n}\n```
['Go']