Given an array nums, for each element return the nearest strictly smaller element to its left, or -1 if none exists. Return the array of answers. The input is JSON {nums}.
Input: JSON {nums}.
Output: Array — the previous smaller element for each position.
Input: {"nums":[1,6,4,10,2,5]}
Output: [-1,1,1,4,1,2]
Explanation: Nearest smaller to the left of each.Input: {"nums":[5]}
Output: [-1]
Explanation: Nothing to the left.Input: {"nums":[4,3,2,1]}
Output: [-1,-1,-1,-1]
Explanation: Strictly decreasing has none to the left.1<=n<=10^5