Daily challenge for 2026-10-30
668. Detect 132 Sequence
Given an array of integers nums, return true if there exists a subsequence of three integers nums[i], nums[j], and nums[k] such that i < j < k and nums[i] < nums[k] < nums[j]. Otherwise, return false.
Constraints:
There are 0–2,000 integer values, each with absolute value at most 1,000,000. All three inequalities and the order of the three indices are strict. Repeated values do not satisfy a strict inequality.
Example:
Input: nums = [1, 2, 3, 4]
Output: false
Run this challenge interactively in Python or JavaScript when the app loads.