Search
⌘K

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.

Comments

Your account is free and you can post anonymously if you choose.