Evaluate the following postfix expression:
4, 5, 4, 2, ^, +, *, 2, 2, ^, 9, 3, /, *, -
Write a pseudo code for evaluate postfix expression.
[3+2]
Pseeduo code:
while tokens remain:
read the next token.
if the token is an operator:
pop the top two elements of the stack.
perform the operation on the elements.
push the result of the operation onto the stack.
else:
push the token (which must be a number)onto the stack
Construct an AVL tree using the below list. Show all the steps 12, 11, 13, 10, 09, 15, 14, 18, 7, 6, 5.
Explain left factoring with suitable example.