problem 1)a) prepare a function to detemrine the factorial of a number using recursion. Trace this function for a number n=5.
b) Define the following with respect to a binary tree:
(i) Depth
(ii) Sibling
(iii) Skewed tree
(iv) Complete binary tree
(v) Leafnode
problem 2)a) prepare a function to implement heap sort.
b) Draw the heap for the elements shown below stepwise.
50, 25, 30, 75, 100, 45, 80 3 M
c) Trace the function in Q 2.a) for the heap constructed in Q 2. b)
problem 3)a) prepare the function to convert the infix expression to postfix expression using a stack.
b) What are the prefix and postfix forms of the following expression?
a*(b+c/(4*a*c)) 2M
c) Trace the function in Q 3.a) for the expression in Q 3. b) suitably.