0
How to stop the selection sort if array is already sorted
How do I stop the array or put an bool in the code to break the code if the array is already sorted. Just to make lesser iterations on the code this is my code right now https://code.sololearn.com/cP6Bkr3WFmN5/?ref=app
1 Antwort
+ 2
Hi Miko,
The code was truncated cause it's too big to fit in Description. Can you please save that code in SoloLearn and share the link to it instead?
Here's how we share link to our code, in case you didn't know ...
https://www.sololearn.com/post/75089/?ref=app