From 57d83257c2909562f863342b8bd37588c182301d Mon Sep 17 00:00:00 2001 From: shloimy <136237874+shl505@users.noreply.github.com> Date: Sun, 22 Oct 2023 14:36:34 +0300 Subject: [PATCH] Typo correction --- algorithms/python/Kadane's_Algorithm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/algorithms/python/Kadane's_Algorithm.py b/algorithms/python/Kadane's_Algorithm.py index 2395a99..86d72be 100644 --- a/algorithms/python/Kadane's_Algorithm.py +++ b/algorithms/python/Kadane's_Algorithm.py @@ -2,7 +2,7 @@ # Given an integer array nums, we find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. -def maxSubArray(nums: List[int]) -> int: +def maxSubArray(nums: list[int]) -> int: if not nums: return 0 if len(nums)==1: @@ -32,4 +32,4 @@ def maxSubArray(nums: List[int]) -> int: print("Maximum Sum =",maxSubArray(nums)) # 6 because [4,-1,2,1] has the largest sum = 6. print("Start Index of Maximum Subarray =",start) # 3 print("End Index of Maximum Subarray =",end) # 6 -print("Maximum Subarray =",nums[start:end+1]) # [4,-1,2,1] \ No newline at end of file +print("Maximum Subarray =",nums[start:end+1]) # [4,-1,2,1]