FinMechanics interview question

A tweak on Kadanes Algorithm