Which data structure is needed to convert infix notation to post fix notation is ____________.
A
Branch
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Queue
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Tree
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Stack
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution
The correct option is D Stack A stack is needed to convert infix notation to postfix notation. A stack is a container of objects that are inserted and removed according to LIFO (last in first out) principle. Two operations are used push and pop.
Push:- Add an element to the collection
Pop:- removes the most recently added element that was not yet removed.