- traverse from end to front
- find and update available s2
- once we find an element that is smaller than saved s2, we are done

```
bool find132pattern(vector<int>& nums) {
int size = nums.size(), s2 = INT_MIN;
stack<int> seconds;
for (int i = size - 1; i >= 0; i--) {
if (nums[i] < s2)
return true;
while (seconds.size() && nums[i] > seconds.top()) {
s2 = seconds.top();
seconds.pop();
}
if (nums[i] > s2)
seconds.push(nums[i]);
}
return false;
}
```