Content deleted Content added
Tag: Reverted |
Restored revision 1172462374 by Materialscientist (talk) |
||
Line 27:
! Least element in unsorted list
|-
|
| style="text-align:right;" |
| 11
|-
|
| style="text-align:right;" |
| 12
|-
|
| style="text-align:right;" |
| 22
|-
|
| style="text-align:right;" |
| 25
|-
|
| style="text-align:right;" |
| 64
|-
|
| style="text-align:right;" |
|
|}
Line 82:
/* a[0] to a[aLength-1] is the array to sort */
int i,j;
int aLength; // initialise to a's
/* advance the position through the entire array */
/* (could do i < aLength-1 because single element is also min element) */
for (i = 0; i < aLength-1; i++)
{
|