:type nums: List[int] :rtype: bool
(self, nums)
| 58 | """ |
| 59 | class Solution(object): |
| 60 | def increasingTriplet(self, nums): |
| 61 | """ |
| 62 | :type nums: List[int] |
| 63 | :rtype: bool |
| 64 | """ |
| 65 | |
| 66 | if len(nums) < 3: |
| 67 | return False |
| 68 | |
| 69 | one = None |
| 70 | two = None |
| 71 | for i, d in enumerate(nums): |
| 72 | if one: |
| 73 | if d <= one[1]: |
| 74 | one = (i, d) |
| 75 | continue |
| 76 | |
| 77 | if two: |
| 78 | if d <= two[1]: |
| 79 | two = (i, d) |
| 80 | else: |
| 81 | return True |
| 82 | else: |
| 83 | two = (i, d) |
| 84 | else: |
| 85 | one = (i, d) |
| 86 | return False |
| 87 | |
| 88 | |
| 89 |
nothing calls this directly
no outgoing calls
no test coverage detected