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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply