Search
⌘K
Get Premium
Leetcode 334. Increasing Triplet Subsequence
Check whether the array contains an increasing triplet subsequence (indices i<j<k with nums[i]<nums[j]<nums[k]). The challenge is to do it efficiently for n up to 5e5 — optimal solutions scan once while tracking two candidate minima (O(n) time, O(1) space).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.