Skip to content

Commit 6fa8418

Browse files
committed
Maximum Subarray
1 parent 27333d3 commit 6fa8418

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Arrays/53-maximum-subarray.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
'''Leetcode -https://leetcode.com/problems/maximum-subarray/'''
2+
'''
3+
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.
4+
5+
A subarray is a contiguous part of an array.
6+
7+
Input: nums = [-2,1,-3,4,-1,2,1,-5,4]
8+
Output: 6
9+
'''
210

311
# Solution1
412
import math

0 commit comments

Comments
 (0)