+ 1
Please help me fix my code
Goal is a simple selection Sort programm, but im having trouble fixing it,i would be happy if someone could help me, Thx in advance. https://code.sololearn.com/cI4u24AamtwG/?ref=app
2 Respostas
+ 3
varg why don't you start second loop with j as i considering i elemnt has been sorted.. this will help you to remove lsmall variable.. it is already stored in last i index of array itself....
this will help you to check if condition with two values rather than existing three variables...this seems culprit to me as first look
+ 1
Thanks sir for your help, i changed (int j=0;(...)) to (int j=i(...) ) and deleted lSmall and now it works :3.
Therefore my question got awnsered and i would conclude this discussion as closed. Thx