Doubt--Recursion-Selection Sort

code–https://ide.codingblocks.com/s/392738
ques–https://hack.codingblocks.com/app/contests/2022/474/problem

hello @aaliyah_beg

image

this min is not updating correctly becuase it is local variable.

to correct it , pass min as param in function . and perform swap in base case j==n

code–https://ide.codingblocks.com/s/392902

This way, pl comment the errors

@aaliyah_beg

pls check ur updated code here->

let me know if anything is not clear

its not printing the correct output.

it is printing correct.

what test case u r giving?

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.