C# LINQ one-liner
csharp\npublic int LargestAltitude(int[] gain) => gain.Aggregate((Current: 0, Max: 0),\n    (t, g) => (t.Current + g, Math.Max(t.Max, t.Current + g)), t => t.Ma
```csharp\npublic int LargestAltitude(int[] gain) => gain.Aggregate((Current: 0, Max: 0),\n    (t, g) => (t.Current + g, Math.Max(t.Max, t.Current + g)), t => t.Max);\n```
[]