Type List
Domain: a collection of 0 or more items
all of the same type
up to MAX_ITEMS
Operations
Make a new list
Is the list Empty
Is the list Full
Get the length of the list
Is an item in the list?
Delete an item from the list (move everything forward), no holes
Insert an item in the list (always at the end)
Get the first item
Get the next item
BinarySearch(array, key)
- start = 0
- stop = size of the array.
- while start <= stop
- mid = (start+stop)/2
- if array[mid] == key
- return key
- else if array[mid] > key
- stop = mid-1
- else
- start = mid+1;