Skip to content
RED SAGSkills
hard20 pts · first answer countsstacks-and-queues

Detecting a 132 pattern in O(n)

You must find whether an array has indices i < j < k with nums[i] < nums[k] < nums[j], a "132 pattern". What is the standard O(n) approach?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions