Queue is a linear data structure. It follows First In First Out (FIFO). In other words, the item which is inserted first is accessed/deleted first. For example, when you go to cashier in a mall, then the person first in line is served first. This is a queue. Basic Operations:- enqueue/push: Insert item in the … Read more Queue

Evaluation of Postfix Expression Using Stack

In order to solve a complex expression, we first convert the expression from infix to postfix. This is done because the evaluation of postfix expression does not involve parenthesis. Evaluation of postfix expression can be easily done using stack. Algorithm Initialize an empty stack. Scan postfix expression from left to right. If the scanned character … Read more Evaluation of Postfix Expression Using Stack