Stock span one test case not working


can you tell me the test case for which it will give wrong output

@shivanshmittal25 Consider test case:
5
30
40
30
40
30

Expected Output:
1 2 1 4 1 END

Your Output:
1 2 3 4 1 END

Also For:
5
2
3
4
2
5

Expected Output:
1 2 3 1 5 END

Your Output:
1 2 3 4 5 END

Hope this helps :slightly_smiling_face: