Why did we swap the index in the selection sort out of the if condition

in the video…why did we wrote the code out for the if condition to swap the index

hi @nikhilsingh059_0f230d528d8bbaae
i didn’t exactly get your doubt…
u can refer this code -->

hi @nikhilsingh059_0f230d528d8bbaae
I hope your doubt is resolved now??

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.