An Example of Calling Insert
void Bag::insert(int new_entry)
After calling b.insert(17),
we will have this bag b:
3
[ 0 ]
[1]
[ 2 ]
. . .
8
4
17
void Bag::insert(int new_entry)
b.data
b.count
2
[ 0 ]
[ 1 ]
[2]
. . .
8
4
Previous slide
Next slide
Back to first slide
View graphic version