what is the use of taking min=pos at line 8 at 1 hr18min
we can first find the smallest no then swap it with arr[0]
Use of taking min=pos at line 8 at 1 hr 18min
@ishaangoel u r assuming that min is that first position, then finally u find the pos of min and than swap with that, as u dont ave to swap with arr[0] everytime, do a dry run on paper once
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.