Q1. Consider a polynomial p(x, y, z) as:
p(x, y, z) = 8x^{2}y^{2}z – 6yz^{8}+ 3x^{3}yz + 2xy^{7}z – 5x^{2}y^{3} – 4xy^{7}z^{3 }
a) Re-prepare the polynomial so that the terms are in ordered form.
b) Assume that the terms are stored in the order shown in the problem statement in linear arrays COEF, XEXP, YEXP, and ZEXP with the HEAD node first.
Assign values to the LINK so that the linked list comprises the ordered sequence of terms.
Q2. prepare down an algorithm for determining solution to Tower’s of Hanoi problem. Describe the working of algorithm for the 4 disks.
Q3. Consider the given arithmetic infix expression Q.
Q = A + (B * C – (D / E ↑ F) * G) * H
Transform the infix expression Q to equivalent post expression by using the stack.
Q4. prepare down an algorithm for Binary Search method. Apply the algorithm on an ordered array A with the given elements {11, 22,
30, 33, 40, 44, 55, 60, 66, 77, 80, 88, 99}. Find out the number of key comparisons made while searching for the keys 40 and 85.
Q5. Define the term Sorting? prepare down an algorithm for Insertion Sorting method. Apply the algorithm to sort out the elements:
25, 15, 30, 9, 99, 20, 26
Q6. prepare down a recursive function to print the reverse of the string passed to it as the argument.