public interface ArraySortingGopher
| Modifier and Type | Method and Description |
|---|---|
int |
compare(int index)
Compares the key of the item at the given index with the current
remembered key.
|
int |
getSize()
Returns the number of items in the array.
|
void |
remember(int index)
Remembers the key at the given index for future comparisons.
|
void |
swap(int a,
int b)
Swaps the items at the two index positions.
|
void remember(int index)
int compare(int index)
int getSize()
void swap(int a,
int b)