00:01
Hello students, to convert a infix expression to the postfix notation using a stack data structure, we use this algorithm where first of all an empty stack for an operator with an empty list of an postfix expression.
00:14
So with that, you scan this infix from the left to right and one character at a time.
00:22
So if you encounter on an operand of a, b, c, d in this case as it is a postfix expression list, so here the a, b, c, d are the postfix expression whereas the plus minus into as it is the pop operation from stack and add them to the postfix expression until you find an operator with a lower precedence or the stack is empty.
00:44
Then push the current operator onto the stack.
00:47
Then if you encounter an opening parenthesis, push into the stack and onto the stack and if you encounter a closing, pop onto the operators from the stack and then add them to the postfix expression until you find them to an opening parenthesis.
01:06
So let's convert the expression as a as of b plus c by divided by d.
01:17
So here this is our infix.
01:21
Now the postfix will be as the a, b into c, d, this taking it out at plus...