Evaluate the following postfix expression:
4, 5, 4, 2, ^, +, *, 2, 2, ^, 9, 3, /, *, -
Write a pseudo code for evaluate postfix expression.
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.
push the token (which must be a number)onto the stack
What are the differences between AVL Tree & Binary Search Tree ?
What is a minimum spanning tree ? Describe Huffman’s Algorithm.
Find the time complexity of Binary Search Algorithm.
What is tree traversal?
Construct an AVL tree using the below list. Show all the steps 12, 11, 13, 10, 09, 15, 14, 18, 7, 6, 5.
Let T1, T2, T3 be transactions that operate on the same data items A, B, C. Let r1(A) means that T1 reads A, w1(A) means that T1 writes A and so on for T2 and T3. Consider the following schedule: S1: r2(C), r2(B), w2(B), r3(C), r1(A), w1(A), w3(B), w3(C), r2(A), r1(B), w1(B), w2(A). Is the schedule serializable and why?