Pregunta de entrevista de AKUNA CAPITAL

I got something similar to Leetcode's Maximum Subarray.