I was trying to solve āare they sameā problem. Iām getting runtime error.
Plz help me find out error in my code, as the sample test cases are running fine.
Hereās the link to my code: https://ide.codingblocks.com/s/304971
I was trying to solve āare they sameā problem. Iām getting runtime error.
Plz help me find out error in my code, as the sample test cases are running fine.
Hereās the link to my code: https://ide.codingblocks.com/s/304971
@siddharth_1_3277 i think the run time error is because of this part. Size of the string is 0 initially, then how can you assign anything to a1[i] like that ? You need to append the characters like this:
a1 += s1[i];
corrected 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.