Passing all test cases on using an array instead of variable

in this challenge,this code passes all test cases on using array
but if i replace a[10] and b[10] with variables a,b
i.e without use of array…it produces wrong output

@snehasai01
u see the thing logically u need the array in order to store the number of times Ramu is going to use the rickshaw /cab
which u cannot store in the variable since one cab/rickshaw is used different no of time hence to access the value we need to store it in an array
hence a & b need to be array & no integers

1 Like

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.