Question

A linked list has the functions insertAtFront, removeFromFront, insertAtBack, and removeFromBack, which perform operations on nodes exactly as their names describe. Which two functions would most
naturally model the operation of a queue?
(a) insertAtBackand removeFromBack.
(b) insertAtBackand removeFromFront.
(c) insertAtFrontand removeFromFront.
(d) insertAtFrontand removeFromBack.

Answer

This answer is hidden. It contains 3 characters.