Next Smaller Element

Find next smaller element using monotonic stack.

Examples
Input: [1,2,3]
Output: [-1,-1,-1]
Hints

Next Smaller Element

Find next smaller element using monotonic stack.