>>81465005from typing import List

class Solution:

def isIncreasing(self, nums: List[int]) -> bool:

"""Check if list is in increasing order."""

for i in range(len(nums) - 1):

for j in range(len(nums[i::]) - 1):

if nums[j] <= nums[j + 1]:

pass

else:

return False

return True

def checkPossibility(self, nums: List[int]) -> bool:

"""Check if list *could* be in increasing order, if the position of one value was changed."""

popStore = None

for i in range(len(nums) - 1):

for j in range(len(nums) - i - 1):

current = nums[j]

next_ = nums[j + 1]

if next_ < current:

popStore = j

break

if popStore is not None:

nums.pop(popStore)

return self.isIncreasing(nums)

#print(Solution().isIncreasing([1,2,3])) # True

#print(Solution().isIncreasing([2,1,3])) # False

#print(Solution().checkPossibility([4,2,3])) # True

#print(Solution().checkPossibility([4,2,1])) # False

#print(Solution().checkPossibility([3,4,2,3])) # False

#print(Solution().checkPossibility([-1,4,2,3])) # True

print(Solution().checkPossibility([5,7,1,8])) # True

fuckkk this strategy doesn't actually work. in this last one i remove the number 7 but it's still out of order. but i could of moved the 1 forward............ AAAAAAAAAAAAAAAAAAAAAAAAAAA