In recursive case loops working

as in function permute(i+1)
how it is wroking in loop

at time stamp12.59didntb undertand the concept of up and down

As we are trying to swap out current element with other elements, so after you have swapped it once then the new string formed from this has fixed its ith index and now just have to repeated the same procedure for the remaining elements afer swap, so we just callerd permute(i+1).

So till now we have changed the ith index element with jth index element, but since j is changing, so we also have to take the case when the jth value will change, but since we have already swapped the ith and jth index so we just reverse it while going back i.e.backtracking

sir actually in videos i undeertand wht is recursion but i did not understand its processing n ot only iin this video as well as other how it returns i didnt understand how to overcome this preoblem

Call stacks are used to save the current state of recursion.
You just have to understand the steps that are going on. Watch webinar on basics of recursion, then you will be good to go

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.

at time 10.19 why b swap with c its already swapped

@Aditya-Kushwaha-914550392281281
No there b and c are swapped for first time, you need to understand the procedure and draw the recursion tree by yourself then only you will understand this.