My code is : https://ideone.com/ClyWe6
It passes on leetcode, but fails on first test here. Can you find the bug in my code?
Why does my code fail test case 1?
hello @ayushjain.iitg,
if s[i-1]==‘1’ then s[i] can pe upto ‘9’
so modify this part of ur code
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.
Are you sure ? I did that but it still shows wrong answer on test 1
yeah
if s[i-1]=‘1’ then we can have any value for s[i] .
Try long long int datatype instead of int
Ya , it passed with 64 bit int, thanks ankit and aman for help!