Skip to content

Commit

Permalink
q334
Browse files Browse the repository at this point in the history
  • Loading branch information
isinsuarici committed Jun 27, 2023
1 parent acaed1b commit 7189241
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions M_334.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class Solution:
def increasingTriplet(self, nums: List[int]) -> bool:
min, secMin = sys.maxsize, sys.maxsize
for num in nums:
if num <= min:
min = num
elif num <= secMin:
secMin = num
else:
return True
return False

0 comments on commit 7189241

Please sign in to comment.