working through the leetcode max subarray problem, I'm unable to define other fuctions.
Is there an obvious typo in the code below that prevents the functions from being defined?
Additionally, why do they include types for each argument in the function definitions? I haven't seen that in other packages, pandas for instance.
class Solution:
def maxSubArraySum(self, nums:List[int], low:int, high:int) -> int:
return 0
def maxSubArray(self, nums: List[int]) -> int:
return maxSubArraySum(nums, 0, (len(nums)-1))
Running this in the leetcode IDE returns:
NameError: maxSubArraySum is not defined