Sum Of The Maximums Hackerrank Solution