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

asked
User Zareh
by
7.8k 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.
answered
User Jonas Sandstedt
by
8.1k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.