Appscrip interview question

Implement the kadane algorithm and merge sort