notesonly.in

One notebook for every subject — open it anywhere.

Log in

Stacks and queues (including priority queues)

Data Structures · Engineering

Study notes

Evaluate postfix '5 3 2 * +': push 5, push 3, push 2; see *, pop 2 and 3, push 6; see +, pop 6 and 5, push 11. Result 11. Stacks make expression evaluation trivial: no parentheses needed.

← Back to topics for Engineering