Auxiliary Method search
/* Return the index of the leftmost occurrence of item in list, or currentSize if item isn't in list. */
private int search(int item)
{
list[currentSize] = item;
int k = 0;
while (list[k] != item) k++;
return k;
}
Previous slide
Next slide
Back to first slide
View graphic version