Q1. prepare down a program which makes a linked list comprising of nodes of the given struct type and searches the record of a student whose roll number is given by user.
struct student{
char name[15];
int roll;
struct student *next;
};
Q2. What do you mean by merge sort? prepare down an algorithm for the merge sort and derive its run time complexity.
Q3. Assume that the given list of numbers is inserted in order to the empty binary search tree:
45, 32, 90, 34, 68, 72, 15, 24, 30, 66, 11, 50, 10
a) Create the binary search tree.
b) Determine in-order, pre-order and post-order traversal of BST made.
Q4. 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) Reprepare the polynomial in such a way that the terms are ordered.
b) Assume that the terms are stored in order shown in the problem statement in the linear arrays COEF, XEXP, YEXP and ZEXP, with the HEAD node first. Assign values to the LINK so that the linked list comprises of the ordered sequence of terms.