# Method 1:- Brute Force :- TC O(n^3) and SC O(1) # maxLength = 0 # for startIndex in range(len(nums)): # for endIndex in range(startIndex,len(nums)): ...
# Given an integer array nums and an integer k, return true if nums has a good subarray or false otherwise. # A good subarray is a subarray where: # its length is at least two, and # the sum of the ...