Given a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, ak such that i < j < k and ai < ak < aj. Design an algorithm that takes a list of n numbers as input and checks whether there is a 132 pattern in the list.

Note: n will be less than 15,000.

Example 1:

Leetcode 456[medium]--132 Pattern


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2021-07-28
  • 2021-11-27
  • 2021-11-29
  • 2022-12-23
  • 2021-10-07
猜你喜欢
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
相关资源
相似解决方案