Given an array of `n` integers `nums`, a **132 pattern** is a subsequence of three integers `nums[i]`, `nums[j]` and `nums[k]` such that `i < j < k` and `nums[i] < nums[k] < nums[j]`.

Return `true` _if there is a **132 pattern** in_ `nums`_, otherwise, return_ `false`_._

**Example 1:**

**Input:** nums = \[1,2,3,4\]
**Output:** false
**Explanation:** There is no 132 pattern in the sequence.

**Example 2:**

**Input:** nums = \[3,1,4,2\]
**Output:** true
**Explanation:** There is a 132 pattern in the sequence: \[1, 4, 2\].

**Example 3:**

**Input:** nums = \[-1,3,2,0\]
**Output:** true
**Explanation:** There are three 132 patterns in the sequence: \[-1, 3, 2\], \[-1, 3, 0\] and \[-1, 2, 0\].

**Constraints:**

*   `n == nums.length`
*   `1 <= n <= 2 * 105`
*   `-109 <= nums[i] <= 109`
```python
def find132pattern(nums):
    third, stack = float('-inf'), []
    for num in reversed(nums):
        if num < third:
            return True
        while stack and stack[-1] < num:
            third = stack.pop()
        stack.append(num)
    return False
```
explanation
To find the 132 pattern, we iterate through the array from the end to the beginning. We use a stack to keep track of potential third elements (nums[k]) in the 132 pattern. We also keep track of the maximum third element found so far. If we find a number that is smaller than the maximum third element, we know that a 132 pattern exists.

In the Java and Python implementations, we also create a separate array to store the minimum values found so far from the start of the array, which helps in identifying the first element (nums[i]) in the 132 pattern. This step can be skipped in C++ and JavaScript implementations by directly comparing the first element (nums[i]) with the maximum third element stored in the stack.

During the iteration, we check if the current number is smaller than the maximum third element, which would mean a 132 pattern has been found. If not, we update the maximum third element and the stack as necessary to continue searching for the 132 pattern. Finally, we return whether the 132 pattern has been found.