Solved

A Stack Can Be Implemented as a Sequence of Nodes

Question 97

Multiple Choice

A stack can be implemented as a sequence of nodes in a linked list or an array list. Which of the following statements about this is correct?


A) If implementing the stack as a linked list, the least expensive approach is to add and remove elements at the end.
B) If implementing the stack as an array list, the least expensive approach is to add and remove elements at the end.
C) If implementing the stack as an array list, there is no cost difference whether adding and removing elements at the beginning or the end.
D) If implementing the stack as a linked list, there is no cost difference whether adding and removing elements at the beginning or the end.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions