Amazon interview question

A coding question about finding the greatest subarray.