Multiple Choice
You have implemented a queue as a singly-linked list, adding elements at the end and removing elements at the front. What is the cost of the add operation?
A) O(log n)
B) O(n)
C) O(n2)
D) O(1)
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q7: Using the textbook's implementation of a linked
Q24: Which of the following statements about array
Q51: Which of the following actions must be
Q52: A doubly-linked list requires that each node
Q85: Array list operations that were studied included
Q88: Adding or removing an arbitrary element in
Q90: Which of the following algorithms would be
Q92: Using the textbook's implementation of a linked
Q92: Suppose we maintain a linked list of
Q94: Assume that you have a hash table