Given daily stock prices, the span for a day is the number of consecutive days up to and including that day for which the price was less than or equal to that day's price. Return the array of spans. The input is JSON {prices}.
Input: JSON {prices}.
Output: Array — the span for each day.
Input: {"prices":[100,80,60,70,60,75,85]}
Output: [1,1,1,2,1,4,6]
Explanation: Consecutive days not exceeding each price.Input: {"prices":[5]}
Output: [1]
Explanation: A single day has span 1.Input: {"prices":[10,4,5,90,120,80]}
Output: [1,1,2,4,5,1]
Explanation: Spans grow on rising runs.1<=n<=10^5