The text's array-based queue implementations use the fixed-front approach.
Group of answer choices
True
False
Recall that within the LinkedQueue the front and rear variables are of type LLNode<T> holding references to the front and rear nodes of the underlying linked list, and the numElements variable is an int and holds the current size of the queue. Which of the following code sequences could be used to correctly implement the isEmpty operation?
Group of answer choices
return (rear != null);
return (front == rear);
return (numElements != 0);
return (numElements == 0);
Even though our queues will be generic, our QueueInterface is not generic.
Group of answer choices
True
False
When implementing a queue with a linked list, the front of the queue is also the front of the linked list.
Group of answer choices
True
False
The constructor of our LinkedQueue class sets both the front and rear instance variables to null.
Group of answer choices
True
False
1- The text's array-based queue implementations use the fixed-front approach - False
2- Recall that within the LinkedQueue the front and rear variables are of type LLNode<T> holding references to the front and rear nodes of the underlying linked list, and the numElements variable is an int and holds the current size of the queue. Which of the following code sequences could be used to correctly implement the isEmpty operation?
Answer - return (front == rear);
3- Even though our queues will be generic, our QueueInterface is not generic. - False
4- When implementing a queue with a linked list, the front of the queue is also the front of the linked list. - True
5- The constructor of our LinkedQueue class sets both the front and rear instance variables to null. - True
Get Answers For Free
Most questions answered within 1 hours.