Stock span problem

@sudhanshu8917
Hello Sudhanshu,
what issue u r facing

@sudhanshu8917

there were three mistakes in ur code

  1. you were not printing END after printing span of all days(pls check output format)
  2. in line no 11 replaced < with <= (for this check stock defintion)
  3. in line no 14 replace 0 with -1 because (u r using o based index) .to get clarity over this case
    consider a case when there is only one elemnt in your array ur solution will print 0 but actually it should be 1.

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.