Search
⌘K

Leetcode 456. 132 Pattern

Determine whether the array contains indices i < j < k such that nums[i] < nums[k] < nums[j] (a "132" subsequence). With n up to 2·10^5, an O(n) or O(n log n) approach is required, typically using a monotonic stack or tracking minimum-left and candidate "2"/"3" values.


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.