Find the mistake
hey
u are trying to update the input char array which would lead to a problem, trying using a separate output char array
where the final answer is stored
also
the base condition is wrong it wont ever be encountered
in my code i am iterating in the forward direction so the base condition is hit when i reached the last character of the i/p string
Code for ur reference
Good work. it seems its working fine now… right?
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.