Skip to content

Commit

Permalink
Update increasing-triplet-subsequence.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 committed Feb 16, 2016
1 parent 84cd3c0 commit 329ce39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Python/increasing-triplet-subsequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def increasingTriplet(self, nums):
:type nums: List[int]
:rtype: bool
"""
first_min, second_min = None, None
first_min, second_min = float("inf"), float("inf")
for i in nums:
if first_min is None or first_min >= i:
if first_min >= i:
first_min = i
elif second_min is None or second_min >= i:
elif second_min >= i:
second_min = i
else:
return True
Expand Down

0 comments on commit 329ce39

Please sign in to comment.