Define Stack. Differentiate between Stack and Queue.
[3 marks]Compare various asymptotic notations. Mention properties of properties of an algorithm.
[4 marks]Define data structures. Draw classification diagram of various data structures. Mention the operations that can be performed over data structures. Show that 4n2 = O(n3) , using concept of asymptotic notations.
[7 marks]Evaluate given prefix expression + - 9 2 7 * 8 / 4
[3 marks]Show how the given expression can be converted from Infix to Postfix notation using Stack: ((A – B) + D / ((E + F) * G))
[4 marks]Write the algorithm for insertion of a new node at the beginning of singly linked list. Consider the Queue given below which has FRONT =1 and REAR=5 A B C D E Now perform the following operations on the queue: 1. Add F 2. Delete two letters 3. Add G 4. Add H 5. Delete four letters 6. Add I
[7 marks]Write a program to perform insert and delete operations in a doubly linked list.
[7 marks]Solve the following recurrence relation T(n) =T(n-1) + 5 for n >1, and T(1) = 0 as initial condition.
[3 marks]Apply a quick sort algorithm to sort the following data. Justify the steps. 41,27,74,10,64,53
[4 marks]Construct AVL tree for following sequence: 45,36,27,63,39. After the creation of AVL tree insert 72 ,18 and delete 72. (Show each iteration)
[7 marks]Find the order of growth for solutions of following recurrences using master’s theorem:
[3 marks]T(n) = 4T(n/2) + n, T(1) =1 ii) T(n) = 4T(n/2) + log n
[ marks]Apply a merge sort algorithm to sort the following data. Justify the steps. 41,27,74,10,64,53
[4 marks]Create a Binary Search Tree for given elements 84, 25, 36, 15, 48, 09, 17, 55, 92, 11, 15, 7, 1, 12. Find in order and preorder traversal for the same.1
[7 marks]What is principal of optimality? Explain its use in Dynamic Programming Method.
[3 marks]Perform Depth First Search on below given undirected graph starting at node 1 Show the resultant stack.
[4 marks]Solve the following making change problem using dynamic programming method: Amount = Rs. 8 and Denominations: (Rs. 1, Rs. 3, Rs. 5 and Rs. 6)
[7 marks]Differentiate between greedy method and dynamic programming.
[3 marks]Perform Breadth First Search on previously mentioned graph of Q.4(c) starting at node 1. Show the resultant queue.
[4 marks]Describe longest common subsequence problem. Find longest common subsequence of following two strings Xand Yusing dynamic programming. X=<MLNOM>, Y=<MNOM>
[7 marks]Consider the graph given below:
[3 marks]Write the adjacency matrix of G. ii) Write the path matrix of G. iii) Is the graph complete? Justify.
[ marks]Find out the Minimum Spanning Tree using Kruskal algorithm for given Graph:
[4 marks]Find a minimum number of multiplications required to multiply: A [1 × 5], B [5 × 4], C [4 × 3], D [3 × 2], and E [2 × 1]. Also, give optimal parenthesization.
[7 marks]Identify mutually compatible activities and the feasible solution set for below given activity selection problem:
[3 marks]Find out the Minimum Spanning Tree using Prim’s algorithm for given Graph; for previously mentioned graph of Q.5(b) .
[4 marks]Find the optimal solution of the knapsack instance n=4,W=5(capacity), w=(2,1,3,2) and v= (12,10,20,15)
[7 marks]