Question 104Asked in BPSC TRE 2.0 (2023) Computer Class 9-10

Which data structure is required to convert the infix to prefix notation?

  1. AQueue
  2. BStack
  3. CLinked list
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (B) Stack

Explanation

The conversion holds operators on a stack while scanning the expression, so a stack is needed.

From BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper

This is question 104 of BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.