why is it necessary to take a[j+2]=a[j] ?
can’t we take a[j+3]=a[j]
or a[j+4]=a[j]?? and then j–
Replace Pi Recursion
hi @Ambuj-Singh-514796906079795 this is being done to make space in the array.
pi is taking 2 places
3.14 needs 4 places
so we need 2 extra places in the array
so we shift all the characters to the right by 2 places
1 Like
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.