Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
3 Cards in this Set
- Front
- Back
Insertion Sort Algorithm
|
for (k=1; k<n; k++){
for (j=k-1; j>=0 && A[j] > A[j+1]; j--){ Swap(A[j], A[j+1]); } } |
|
Selection Sort Algorithm
|
for (k=0; k < n-2; k++){
best = k; for (j = k+1; j < n; j++){ if (A[j] < A[best]) best = j; }Swap(A[k], A[best]); } |
|
Bubble Sort Algorithm
|
boolean done = false;
for (k = n-1; k > 0 && !done; k--){ done = true; for (j=0; j<k; j++){ if (A[j] > A[j+1]){ Swap(A[j], A[j+1]); done = false; } } } |