Which data structure is best suited for implementing a stack?

  • Array
  • Linked List
  • Queue
  • Hash Table
Option 2, Linked List, is the best-suited data structure for implementing a stack. This is because a stack requires constant time operations for push and pop operations, which can be efficiently achieved using a linked list's dynamic memory allocation and pointer manipulation.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *