Open juneharold opened 3 months ago
Brute force works well
class Solution: def canBeIncreasing(self, nums: List[int]) -> bool: remove = False for i in range(len(nums)-1): if nums[i]<nums[i+1]: pass else: if remove: return False if nums[i-1]>=nums[i+1] and i>0: nums[i+1] = nums[i] remove = True return True
Brute force works well