249 Data Structure Using C

Embed Size (px)

Citation preview

  • 8/8/2019 249 Data Structure Using C

    1/1

    249BE II EXAMINATION APRILRMAY,2009COMPUTER ENGG/INFORMATION TECHNOLOGY2C0202/21T402DATA STRUCTURE USING C Max Marks: 100Min Marks: 35

    NOTE: -There are total five questions. All of these questions arecompulsory. There are three subparts in each of the questions, attemptany two subparts out of three. Assume C/C++ as the programminglanguage for writing the programs.

    Duration: 3Hrs

    01 (A) Explain various dynamic allocation techniques in detail. '-'.. .-(8) Calculate the time complexity of the Merge sort algorithm. Sort the following datausing Merge Sort: -210,4,5,6,11,567,23,54,56,1 0,29,30,42,333,1000,90,654,2345,1(C) Write a program to implement Linked List using structures and pointers as features 10available in C. in this program, implement the following functions-InsertAfter, DeIeteAfter, InsertAtHead,DeleteAtHead,Traversal02 (A) Why stack is considered to be LIFO structure? Explain whether stack can beimplemented using queue. Write an algorithm for the same.(8) What is meant by recursion? How recursion can be eliminated from the recursiveprograms? Explain this with an example.(8) Write an algorithm to translate an arithmetic expression given in infix notation into 10postfix notation. Translate the following infix expression into corresponding postfixone: -O+W*E/R*T$Y$u$i$(O+P) *A+S-D$F$GZ+X-C*V$ b$n$m *I*k+j $h$g* (f+d*s+a)What is meant by priority queue? Write a program to implement it using linked list.Write a program to implement queue using static implementation.Explain the contents of circular queue on each step for the following data andoperations: -10,12,32,del,dei,34,45,56,76,54,43,del,90,09, 13,del,del,delHow a circular queue can be traversed? Explain this with an example.Define tree as data structure and describe its various applications.Differentiate between AVL tree and binary search tree with an exampleExplain the three different traversals techniques of binary tree with algorithms.What is meant by murtiway search tree? Differentiate between B-tree, B+-tree andB'-tree by considering the different types of applications of them.Write short notes on following (any two)Difference between search and traversal for graphDifference between matrix implementation and list implementation of graphDifference between breadth first search and depth first search of graphDefine the following: -ForestArticulation pointConnected componentDirected graphConnected graphWrite an algorithm to determine minimum spanning tree from a weightedconnected graph.

    1203 (A)(8)(C) 12

    Q4(A)12(8)(C)

    05(A)123(8)12345(C)

    **********************************

    .

    1'010

    1010

    101005

    050505101010

    1

    1