Is it necessary to deduct "0" from a[n-1] ,since it will give the same value

since the answer will anyways be same

Hey @Ankur-Ankur-937479863269311 the reason why we want to deduce ‘0’ from a[i] is because , before deducing ‘0’ the ASCII value of a[i] is in string format but we have to make the ASCII value of a[i] into integer. That’s the reason why we we are deducing’0’ from every element to treat them as an integer value :grinning:

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.