So,how do we know ifthe queue is full or empty? In order to distinguish a
full queue from an empty queue, we must add another instance variable to
our class.We will keep track of the number ofelements in the queue: ifthe
number of elements is 0,then the queue is empty; if the number ofele-
ments is equal to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.