667. Next Greater Element - II
Given a circular integer array called 'nums', where the next element of nums[nums.length - 1] is nums, find the next greater number for every element in nums. The next greater number of a number 'x' is the first greater number to its traversing-order next in the array. If it doesn't exist, print -1 for this number.
The first line contains an integer 'n' which represents the size of the array. The second line contains 'n' space-separated integers, representing the elements of the array.
Print the next greater number for every element in nums.
5 1 2 3 4 3
2 3 4 -1 4
1 <= n <= 10^5 -10^4 <= nums[i] <= 10^4