? Data Structure - 2130702 - Paper Solution for the GTU Exam Summer-2018 Home Subject Data Structure Database Management Systems About Us Contact Us Home Data Structure - 2130702 Summer - 2018 Paper Solution | Summer - 2018 Data Structure - 2130702 Date: 05/21/2018 Total Marks : 70 Q.1 (a) Differentiate between linear and non linear data structures. 3 marks Answer (b) Discuss the variations of a queue. 4 marks Answer (c) Write an algorithm to convert an infix expression to postfix expression. Show the working of the algorithm for the following expression. A+B*C/D$E-(F*G) 7 marks Answer Q.2 (a) Evaluate the following postfix expression using a stack. Show the steps. 2 $ 3 + 5 * 2 $ 2 – 12 $ 6 3 marks Answer (b) Consider the stack S of characters, where S is allocated 8 memory cells. S: A,C,D, F, K, _, _, _ Describe the stack as the following operations take place. Pop(), Pop() ,Push(L), Push(P), Pop(), Push(R), Push (S), Pop() 4 marks Answer (c) Write a program to implement queue and check for boundary conditions. 7 marks Answer OR (c) Write a program to implement a circularly linked list. 7 marks Answer Q.3 (a) List the advantages of a doubly linked list over singly linked list. 3 marks Answer (b) Write an algorithm to swap two nodes, n and n+1, in a singly linked list. 4 marks Answer (c) Perform inorder, postorder and preorder traversals for the following binary tree. What is the peculiarity of the inorder traversal? 7 marks Answer OR Q.3 (a) What is a header node? Explain its importance. 3 marks Answer (b) Write an algorithm to count the number of nodes in a singly circularly linked list. 4 marks Answer (c) What is a binary search tree? Create a binary search tree for the following data. 14, 10, 17, 12, 10, 11, 20, 12, 18, 25, 20, 8, 22, 11, 23 Explain deleting node 20 in the resultant binary search tree. 7 marks Answer Q.4 (a) Explain the working of the Kruskal’s algorithm. 3 marks Answer (b) Write the algorithm for binary search and find its complexity. 4 marks Answer (c) Insert the following letters into an empty B-tree of order 5: C N G A H E K Q M F W L T Z D P R X Y S 7 marks Answer OR Q.4 (a) Define the following terms with respect to a graph: Node, Edge, Path 3 marks Answer (b) Discuss different representations of a graph. 4 marks Answer (c) Apply Djkstra’s algorithm for the following graph with Node S as the starting node. 7 marks Answer Q.5 (a) What is the complexity of the quick sort algorithm on sorted data? Justify your answer. 3 marks Answer (b) What is hashing? Explain hash collision and any one collision resolution technique. 4 marks Answer (c) Explain the difference between insertion sort and selection sort with an example. What is the time complexity of these algorithms? How? 7 marks Answer OR Q.5 (a) List the qualities of a good hash function. 3 marks Answer (b) Explain two hash functions. 4 marks Answer (c) Apply merge sort algorithm for the following data and show the steps. 66, 33, 40, 22, 55, 88, 11, 80, 20, 50, 44, 77, 30 7 marks Answer Nail is still a very popular fashion replica handbags uk in autumn and gucci replica . The furry design on the hermes replica of the bag makes this autumn and handbags replica. Xiaobian likes the buckle like sapphire and looks quite replica handbags .