Algoshots interview question

Kadane Algorithm Next Immediate Greater Element