Computer Science and Engineering › Stacks › Question #5752
Single Choice Easy

QWhich of the following is an example of a real-world application of a stack?

ID: #5752 Stacks 285 views
Question Info
#5752Q ID
EasyDifficulty
StacksTopic

Choose the Best Option

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

  • A Checking if a sentence is a palindrome ✔ ✖
  • B Solving a maze ✔ ✖
  • C Evaluating the postfix notation of an arithmetic expression ✔ ✖
  • D Storing data in a database ✔ ✖
Correct Answer

Explanation

Answer: a) Checking if a sentence is a palindrome

Explanation: A stack can be used to check if a sentence is a palindrome by pushing the first half of the sentence onto the stack and then comparing the remaining half to the elements popped from the stack.

Share This Question

Challenge a friend or share with your study group.