Pseudocode for Bag::insert
assert(size( ) < CAPACITY);
Place new_entry in the appropriate location of the data array.
Add one to the member variable count.
data[ count++] = new_entry;
Previous slide
Next slide
Back to first slide
View graphic version