You are on page 1of 3
469 November - 2021 EXAMINATION HI B.E. (4YDC) ELECTRONICS AND INSTRUMENTATION ENGG 1137003: DATA STRUCTURES, Time: 90 Min Max Marks: 40. TOTAL NO. OF QUESTIONS IN THIS PAPE n has three parts a, b,c. ) Attempt any two parts from each question, ‘Take necessary assumptions, if required. i) Each ques CO BL Marks Q.1 (a) Define Asymptotic Notation? Explain Big O, Big Q and Big © notation with CO4 BLI [04] a suitable example. & BL2 (b) Given an array, arr[T......0ce12][T....-0..16] with base value 1000 and the CO2 BLS [04} 4 size of each element is 3 Byte in memory. Find the address of arr[5][8] with the help of row-major order and column major order? (e) Suppose, an array A[T........69) is stored in memory whose starting address COZ BL [04], is 460. Assume that the word size for each element is 2 bytes. Find the following: i) How many number of elements are there in the array A? ii) one word of the memory is equal 1 2 bytes, then how much memory is required to store the entire array’? iii) What is the location of AUS}? iv) What is the location of the 11th element? Q.2 (a) Consider the following arithmetic expression in postfix notation COL BLA jos) TS2+ SANS /- & & i) Find the value of the expression Coz BLS i) Find the equivalent prefix form of the above expression, 5 iii) Find the value of the expression from its prefix notation, () Consider the following queue of characters, where QUEL whieh is allocated six memory cells: Front =2, Rear 4, QUEUE: _.A.C.D. Here" “is used to denote an empty memory cell. Deseribe the queue as the following operation take pla i) F is added to the queue, i), Two letters are deleted from the queue. K. Land M are added to the queue. iv) Two letters are deleted from the queue, ¥) Sis added to the queue. vi) Two letters are deleted from the queve. Fis acircular array COS B12 [041 (©) What is a linked list? Explain different types of linked lists with a suitable Cot BLI (04 example. & BL = Q3 Qs (a) ) (ce) (a) ( (©) (a) Consider a hash table with bucket capacity “m” as 10 and the hash funetion is CO “hikey) = key mod m”. Using linear probing, insert the keys in an empty & hash table in the given order: (25, 98, 33, 75, 68, 55, 29, 44, 87}, COs i) Draw the filled hash table following cael ii) How many collisions are there after inserting the last key. Suppose an array A contains 8 elements as follows: cos A: (99, 2, 34, 18, 76, 15, 25,4) Apply insertion sort algorithm on an array A to sort its element, Depiet the state of the array afier each pass of the algorithm, Write the recursive algorithm of Binary Search Tree. Create the binary search CO3 tree whose clements are inserted in the following order: {50 72 9694 107 26 1211921025 51 161795) Consider the following traversal of a nary search tree as follows: cor Inorder traversal: 1,2,3,4,5,6, 7,8 & Preorder traversal : 5,3. 1,2, 4,6, 8,7 cos Construct the binary search tree and find out the Postorder traversal. Construct AVL trees that result from the following sequence of cos into an AVL search tree: {100, 700, 400, 50, 20, 800, 900, 750, 500, Demonstrate the result of inserting {10, 12, 1. 14, 6. 5. 8 15.3.9. 7.4, HL. COB 13, 2} these elements one at a time, into an initially empty binary min heap. Consider the Graph No, 1 and apply the Breadth First Search (BFS) and CO3 Depth First Search (DFS) to find out one of the possible traversals of this graph, Assume the start vertex isa", © & \ (*) oO ©) { (9) \ ©) Figure: | BL BLS BLS BLS BLO BLI BL3 BLS 4} (04) 04) 104) [04] [04] 04] sa» (b) Consider the directed graph given in figure 2 CO3 BLS jos] ) (Q—_——+(a) Figure : 2 \kstra Algorithm to find the shortest path and as Apply the L vertex as ume the source Use Prim's Algorithm to find a minimal cost spanning tree for the Graph CO3- BL [04] given in figure 3. Assume “A” as the starting vertex. igure :3

You might also like