Whats is my mistakes Stock Span

https://ide.codingblocks.com/s/112387<–solution
https://hack.codingblocks.com/practice/p/370/404<–question

Hello @ARYAN27,

The problem is with the value of T (no. of testcases)
You are not taking input for T in your code.

So, it is taking 1 as n and only executing for 5 (the only element the array)

Note:
Don’t forget to print the output of each testcase in a separate line.
Else, you would get an error.

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

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.

what u told is wrong pls check question first ???

their is no testcase ??

I guess I have mistakenly sent someone else solution to you.:sweat_smile:

Coming back to the original problem:
I modified it. Read the comments for a better understanding.

Let me know if you don’t understand something.

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

1 Like