Replace Pi recursion

sir i am able to understand why we did j=i+2; as index is at “p” so i+2 will make j at three slots with 3.1 and not what we want 3.14, so how it is giving 3.14, so why we are doing j=i+3

hello @tejuschaturvedi0

we have replace pi with 3.14 ie we have removed 2 character and added 4 new character . so we need to produce 2 extra space for that we are shifting [i+2 …] by two poisition in the right so that we get two extra spaces.

after that we need to make call on i+4 (becuase till i+3 we have 3.14)

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.