Page 1 of 1

Given an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such th

Posted: Sat May 14, 2022 3:58 pm
by answerhappygod
Given an array of n integers nums,
a 132 pattern is a subsequence of three
integers nums, nums[j] and nums[k] such
that i < j < k and nums < nums[k] <
nums[j].
Return true if there is a 132
pattern in nums, otherwise,
return false.
Example 1:
Example 2:
Example 3:
Constraints:
class Solution:
def find132pattern(self, nums: List[int]) ->
bool:
Implementation in Python3