Capital One Interview Question

They asked me to solve a coding problem on arrays, specifically finding the maximum subarray sum, and explain my approach step by step.