mirror of
https://github.com/TheAlgorithms/Ruby
synced 2024-12-26 21:58:56 +01:00
Update maximum_subarray.rb
This commit is contained in:
parent
e676e283ea
commit
8519e419fa
1 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@
|
|||
|
||||
|
||||
|
||||
#Sliding Window Approach - O(n) Time / O(1) Space
|
||||
#Dynamic Programming Approach (Kadane's Algorithm) - O(n) Time / O(1) Space
|
||||
#Init max_sum as first element
|
||||
#Return first element if the array length is 1
|
||||
#Init current_sum as 0
|
||||
|
|
Loading…
Reference in a new issue