Process a stream of daily stock prices. For each new price, return its span — the number of consecutive days (ending today) whose price was less than or equal to today's. Return the array of spans in order. The input is JSON {prices}.
Input: JSON {prices}.
Output: Array — the span after each price.
Input: {"prices":[100,80,60,70,60,75,85]}
Output: [1,1,1,2,1,4,6]
Explanation: Streaming stock spans.Input: {"prices":[31,41,48,59,79]}
Output: [1,2,3,4,5]
Explanation: Monotonic rise.Input: {"prices":[5]}
Output: [1]
Explanation: First day.1<=n<=10^4