1def max_subarray(nums: list[int]) -> int:2 # Your code here3 pass
Solve the problem first before reviewing the solution!