Stock Span Problem

Find span of stock prices using monotonic stack.

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

Stock Span Problem

Find span of stock prices using monotonic stack.