ZeMoSo interview question

Code kadane's problem in java