STOCK SPAN using stack


NOT PASSING ANY TEST CASE
CONFUSE TO TAKE SIZE OF ans[ ] array

Hello @AjayRRJ,

There are many logical mistakes in your code.
I have corrected them:

Refer to comments for better understanding.

Hope, this would help.
Give a like if you are satisfied.