Unit 1 Cs3251
Unit 1 Cs3251
(b) (i) Discuss the Analysis of recursive algorithm with an example. [UN] (8)
(ii Explain the concepts of python Inheritance with an example. (5)
)
1 (a) (i) Write a program to derive an ADT to perform insertion and deletion in a [UN] (8)
4 singly linked list.
(ii Discuss and write a python program to merge two sorted arrays. [UN] (5)
)
OR
(b) (i) Explain the various operations of the list ADT with examples. [UN] (13)
1 (a) (i) What is Priority Queue and analyze its implementation. [UN] (8)
5
(ii Write a program to implement the stack ADT using linked list. [UN] (5)
)
1 (a) (i) Prove or solve that the worst case time of the extraction operation on a heap [UN] (15)
6 implemented as an array is O(log n).
OR
(b) (i) Convert the given infix expression AB*C-DEF into a postfix and postfix [UN] (15)
output into prefix expressions and explain the procedure in detail. Illustrate
the steps.