Describe two different ways the isEmpty method of the LinkedQueue class could be implemented.

What will be an ideal response?


In addition to checking the value of count, a queue will be empty only if the reference the front of the queue is null, or if the reference to the rear of the queue is null. You cannot, however, simply check if front and rear are equal, which will occur when there are zero or one elements in the queue.

Computer Science & Information Technology

You might also like to view...

Which of the following pieces of information is generally provided by a Web feed?

A) a link to the full article B) author's biography C) editor D) place of publication

Computer Science & Information Technology

You can format a macro button using 3-D effects by right-clicking the button, selecting ____ from the shortcut menu, then selecting the 3-D effects.

A. Shapes B. Format Shape C. Assign Shape D. Design Shape

Computer Science & Information Technology

All of the following are Task Manager tabs EXCEPT ________

A) Performance B) Users C) App History D) Printers

Computer Science & Information Technology

You can perform all of the following with the Start screen tiles EXCEPT ________ them

A) remove B) add C) share D) rearrange

Computer Science & Information Technology