You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'''4) Given an array of integers, your task is to find the maximum sum of a contiguous subarray. A contiguous subarray is defined by selecting a range of elements from the array without skipping any element.
Write a function that takes a list of integers nums as input and returns the maximum sum of a contiguous subarray. [-2, 1, -3, 4, -1, 2, 1, -5, 4], output: 6 -> [4, -1, 2, 1]'''