Getting the output

Could you please explain why you ran a loop to get the output after calling the selection_sort function? the selection_sort function does not return/print anything right?

in the selection sort, you are just arranging the elements in increasing fashion.
its not printing anything. so you are right. we are running a loop to print the sorted output.

thanks

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.