Update maximum_subarray.rb

This commit is contained in:
sidaksohi 2021-08-25 15:41:20 -07:00 committed by GitHub
parent e676e283ea
commit 8519e419fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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