π™Žπ™šπ™‘π™šπ™˜π™©π™žπ™€π™£ π™Žπ™€π™§π™© The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning.The function of selection sortvoid selectionSort (int a[]){ int n = a.length; for (int i = 0; i < n - 1; i ){ int min_idx = i; for (int j = i 1; j < n; j ) if (a[j] < a[min_idx]){ min_idx = j; } int t = a[min_idx]; a[min_idx] = a[i]; a[i] = t; } } - Study24x7
Social learning Network
study24x7

Default error msg

Login

New to Study24x7 ? Join Now
Already have an account? Login
617 followers study24x7 06 Mar 2020 03:36 PM study24x7 study24x7

π™Žπ™šπ™‘π™šπ™˜π™©π™žπ™€π™£ π™Žπ™€π™§π™© The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning.
The function of selection sort
void selectionSort (i...

See more

π™Žπ™šπ™‘π™šπ™˜π™©π™žπ™€π™£ π™Žπ™€π™§π™©...
study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles