Data Structure Stacks Question #5743
Single Choice Easy

QWhat is a stack in data structure?

ID: #5743 Stacks 243 views
Question Info
#5743Q ID
EasyDifficulty
StacksTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A A data structure that allows elements to be inserted and removed in any order
  • B A data structure that allows elements to be inserted and removed from the beginning or end
  • C A data structure that allows elements to be inserted and removed from one end only
  • D A data structure that allows elements to be inserted and removed from both ends
Correct Answer

Explanation

Answer: c) A data structure that allows elements to be inserted and removed from one end only

Explanation: A stack is a data structure that follows the Last-In-First-Out (LIFO) principle, meaning that the element that is inserted last will be the first to be removed. It allows elements to be inserted and removed from the top end only.

No Previous Next Question

Share This Question

Challenge a friend or share with your study group.