You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such that i < j < k and nums[i] < nums[k] < nums[j].
3
+
Return true if there is a 132 pattern in nums, otherwise, return false.
4
+
5
+
Test Case I:
6
+
Input: nums = [1,2,3,4]
7
+
Output: false
8
+
Explanation: There is no 132 pattern in the sequence.
9
+
10
+
Test Case II:
11
+
Input: nums = [3,1,4,2]
12
+
Output: true
13
+
Explanation: There is a 132 pattern in the sequence: [1, 4, 2].
0 commit comments