Which data structure is required to convert the infix to prefix notation?
2023
Which data structure is required to convert the infix to prefix notation?
- A.
Stack
- B.
Linked list
- C.
Binary tree
- D.
Queue
Attempted by 692 students.
Show answer & explanation
Correct answer: A
Answer: a
Explanation: The answer is a, i.e., stack. Stack is a data structure used to reverse the order of the operators in the expression. It is also used as a storage structure that stores all the operators and print all the operators when all the operands have appeared.