77.8k views
5 votes
Why was an iterator not appropriate for stacks and queues but it is appropriate for lists?

User Zareh
by
6.4k points

1 Answer

0 votes
Answer: Stacks and queues are special cases of the idea of a collection. ... length of the array items[] so that it is sufficiently large to hold all of the items and but not so large as to waste an excessive amount of space.
User Jonas Sandstedt
by
7.0k points