#334 - Increasing Triplet Subsequence
Given an integer array nums, return true if there exists a triple of indices (i, j, k) such that i < j < k and nums[i] < nums[j] < nums[k]. Otherwise return false. Solve in O(n) time and O(1) space.
| Input | Output |
|---|---|
nums = [1,2,3,4,5] | true |
nums = [5,4,3,2,1] | false |
nums = [2,1,5,0,4,6] | true |