Please check where the mistake is?

link to the solution

hey @pranav_sharma, can we discuss the logic first?

i took 3 array 1st for the user input 2nd array for the 1st string and 3rd for the 2nd string.

t in an integer, kindly input it as an integer, there’s no point in taking input as char array and after that converting it to integer.
So, what’s ur logic to solve this problem?

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.