wrong output
Stock span problem
@ayu2321
in case of s.empty() do betterDay=-1, because here no elements are present in the stack so we need to count 0th day also.
you can confirm this by taking a small eg:-
3
1 2 3
I hope this thing is clear.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.