Can't figure out the error
Don’t create array of greater than 10^6 in main
Also
If flag==0 then break
Done all rectifications as you said. Still error persists
Send me the updated code
If a[i] > a[j]
Then
Swap (a[I] , a[j])
Still not solved. Please let me know some of the examples where this is failing
take
5
4 3 5 2 1
actually u r writting the code of selection sort
in bubble sort u have to find the max element and insert it in the end and u r not doing this
just run on a simple example u will see
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.