Stock Span Problem


Getting wrong answer in test case 4

@dsingh200021 Consider a case in which all stock prices are same.( A span of a stock’s price on a given day, i, is the maximum number of consecutive days before the (i+1)th day, for which stock’s price on these days is less than or equal to that on the ith day. )
So consider a case:
5
30
30
30
30
30

Expected Output:
1 2 3 4 5 END

Your Output:
1 1 1 1 1 END

Hope this helps :slightly_smiling_face: