[Python] Monotonic Stack - One pass - Clean & Concise
Idea\n- Exactly the same idea with 496. Next Greater Element I.\n- Here, we iterate from [2n-1...0] instead of from [n-1..0], and to access value if nums[i] we 
**Idea**\n- Exactly the same idea with **[496. Next Greater Element I](https://leetcode.com/problems/next-greater-element-i/discuss/1533016)**.\n- Here, we iterate from `[2n-1...0]` instead of from `[n-1..0]`, and to access value if `nums[i]` we access `nums[i % n]`.\n```python\nclass Solution:\n    def nextGreaterElements(self, nums: List[int]) -> List[int]:\n        st = []\n        n = len(nums)\n        ans = [-1] * n\n        for i in range(2*n-1, -1, -1):\n            while st and st[-1] <= nums[i%n]:\n                st.pop()\n            if st and i < n:\n                ans[i] = st[-1]\n            st.append(nums[i%n])\n        return ans\n```\nComplexity:\n- Time: `O(N)`, where `N <= 10^4` is length of `nums` array.\n- Space: `O(N)`
[]