0% found this document useful (0 votes)
246 views

Data Structures Question Bank MGU semIV

This document contains questions and answers related to various data structures and algorithms topics. It covers topics like arrays, linked lists, stacks, queues, trees, graphs, sorting, and hashing. For each topic, it provides short answer questions testing basic understanding as well as essay questions requiring explanations and code implementations.

Uploaded by

Lakshmi Vs
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
246 views

Data Structures Question Bank MGU semIV

This document contains questions and answers related to various data structures and algorithms topics. It covers topics like arrays, linked lists, stacks, queues, trees, graphs, sorting, and hashing. For each topic, it provides short answer questions testing basic understanding as well as essay questions requiring explanations and code implementations.

Uploaded by

Lakshmi Vs
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

DATA STRUCTURES AND ALGORITHMS MODULE I Short Answer questions 1. 2. Explain time complexity and space complexity.

(May 08, Apr 04) Explain representation of 2D array in memory. Derive a linear expression to locate an element in each case. (May 08, Dec 07) 3. Comment on array implementation of queues and its limitations. (Dec07) 4. Define: Data structure, Time complexity, Space complexity, Big O notation. (Jul 07) 5. Give an efficient method of storing sparse matrices. (July 07) 6. What is meant by complexity of an algorithm? Explain. (Jan 07) 7. Explain algorithm for push and pop operations on a stack. (Jan 07) 8. Differentiate between row major and column major representation of arrays. Obtain a linear expression for address of an m x n array in row major representation. (Dec 05) 9. Explain algorithm. Why the analysis of an algorithm becomes important. (May 06) 10. Explain any one application of priority queue. (May 06) 11. How recursive procedures are implemented using stacks? (Dec 05) 12. How a sparse matrix is implemented? (May 05) 13. What are Deques? Explain their importance. (May 05) 14. Define queue, deque, priority queue (Apr 04) Essay questions 1. Explain the algorithm for addition of two polynomials using arrays.(May 08) 2. Explain implementation of priority queue. (May 08, Dec 07) 3. a) Write an algorithm to implement stack using arrays b) Write an algorithm to implement queue using arrays. (Dec 07) 4. Write a recursive algorithm to find the factorial of a number and analyze its time complexity. (Jul 07) 5. Explain the representation of polynomials using arrays. Write an algorithm to add two polynomials. (Jul 07, Jan 07) 6. a) Analyse the time complexity of insertion sort algorithm. b) Define O, notations. (Jan 07) 7. Define big O notation. Prove that the worst case computing time for insertion sort is O( n^2) (Dec 05) 8. Explain asymptotic notation, with the help of examples. (may 06) 9. Explain sparse matrix. Write the algorithm for performing sparse matrix addition. (May 06)

10. a) Explain how polynomials can be represented using arrays. b) What are Deques? Write an algorithm to insert an element in to Deque. 05) 11. Obtain the best case, worst case and average case analysis of a binary search algorithm. Justify your answer with the algorithm and an example. (May 05)

(Dec

12. a) How recursive procedures are implemented using stack? b) Write the algorithm for inserting an element into a circular queue. (May 05) 13. a) Explain any one method of representing 2-D arrays in memory. B) Write algorithms which insert and delete items from a deque (Apr 04) MODULE II Short Answer Questions 1. How is a polynomial is represented using linked list. 2. What are the applications of circular linked list (May 08) (May 08)

3. Write a function to delete a node from a doubly linked list, given the data. (Dec 07) 4. Explain the need of a header node in a circular linked list. (May 06,Dec 07) 5. Write a function to reverse a linked list when a pointer to the starting node is given (Jul 07) 6. Give the advantages and disadvantages of linked lists. (Jul 07) 7. Explain any one application of linked list. (Jan 07) 8. Compare linear and circular linked lists. (Jan 07) 9. Compare singly linked and doubly linked lists. (May 06) 10. What are the advantages and disadvantages of a doubly linked list. (dec 05) 11. Suppose there is a stack of n elements implemented using linked list. What are the steps required to convert it into a queue. (Dec 05, May 05) 12. How stacks are implemented using linked list. (May 05) Essay Questions 1. Explain the stack and queue implementation with linked list.(Dec 08, Jul 07) 2. Explain the insert, delete, search operations in a circular linked list. (Dec 08, May 06) 3. How will u represent polynomials using linked lists? Let D be a polynomial of degree2 stored in a linked list. Write an algorithm/pseudo-code to find the roots of the equation D=0; given a pointer to the staring node of the list. (Dec 07) 4. Write an algorithm to implement queue using circular linked list. (Dec 07)

5. Write an algorithm or pseudo-code to implement dque using doubly linked list. (Jul 07) 6. Explain algorithms for insertion and deletion operations on a doubly linked list. (Jan 07) 7. a) Explain algorithm to traverse the links within a list. (Jan 07) b) Compare array and linked list 8. Represent polynomials using linked list and define the algorithm for polynomial addition. (May 06) 9. Write an algorithm to: a) insert a new node after a node containing a particular element. b) deleting a node containing a particular element. Here the data structure is a circular linked list. 10. Write an algorithm to check whether a given arithmetic expression containing balanced parenthesis using linked list. 11. MODULE III Short Answer Questions 1. Explain B Tree. For a B tree of order 4 of 10 successive insertions are done from scratch, how many nodes split are needed? (May 08) 2. Draw the binary tree with the traversals: Preorder: 1 2 3 5 8 9 6 10 Inorder: 2 1 8 5 9 3 10 6 (May 08) 3. Write a function to count the number of leaf nodes in a binary tree; given a pointer to the root node. (Dec 07) 4. Construct the Binary Tree whose traversal sequences are given Preorder: A B C D E F G H I Postorder: B C A E D G H F I (Dec 07) 5. Explain the concept of B trees. Construct a B Tree for a sample set of values. (Jul 07, May 06) 6. Construct a binary search tree whose preorder traversal gives the sequence: 8 4 1 12 9 30 17 22 50 (Jul 07) 7. Define binary tree. Compute the maximum number of nodes at a particular level of a binary tree. (Jan 07) 8. Explain balanced binary tree. (Jan 07) 9. Explain full and complete binary trees. (May 06) Essay Questions 1. Explain the insert, delete, search operations in BST. (May 08) 2. Explain the advantage of balanced tree over unbalanced tree, with an example. (May 08)

3. Explain the concept of threaded binary trees. Write functions to find the inordersuccessor and inorder predecessor of a given node. (Dec 07) 4. a) Give three differences between a tree and a binary tree. Mention any two applications of a tree. b) Give a non recursive function/pseudo-code that performs inorder traversal on a binary tree when a pointer to the root node is given. (Dec 07) 5. Explain AVL trees and illustrate insertion and deletion operations with the help of an example. (Jul 07, May 06) 6. Write an algorithm/pseudo-code to implement binary search tree with provisions to create, insert and delete a node. (Jul 07, Jan 07) 7. a) Explain threaded binary tree. b) Compare B Tree and B+ Tree. (Jan 07) 8. Write algorithms for binary tree traversals. Give preorder, inorder and postorder listings of the following binary tree. 25 a. 1 32 19 52 79 MODULE IV Short Answer Questions 1. 2. 3. 4. 5. 6. 7. 8. 9. Explain any one hashing method. What is compaction? Explain. Comment on different storage allocation strategies. Explain any two methods of constructing a hash function. Explain any two methods of representing graphs in programs. Differentiate between open hashing and closed hashing. Explain adjacency list representation of graph. Write a short note on hashing. (May 08) (May 08) (Dec 07) (Dec 07) (Jul 07) (Jul 07) (Jan 07) (Jan 07) 83 45 11 67 92

Essay Questions 1. Explain different graph representation methods. (May 08) 2. Implement BFS and DFS non-recursively. (May 08) 3. a) Explain garbage collection and compaction b) Implement depth first search non recursively. (Dec 07) 4. Give algorithms/pseudo-code to implement open hash tables with provisions to insert and delete elements. Compare open hashing with closed hashing. (Dec 07) 5. Give algorithms/pseudo-codes to implement DFS and BFS on an undirected graph. Illustrate the working. (Jul 07) 6. a) Explain any two collision resolution techniques used in closed hashing. B) Explain the different storage allocation strategies. (Jul 07)

7. Explain any one algorithm for obtaining minimal spanning tree of a given graph. (Jan 07) 8. Explain garbage collection and compaction. (Jan 07) 9. MODULE V Short Answer Questions 1. Explain bubble sort algorithm. 2. Differentiate internal and external sorting. 3. 4. 5. 6. 7. (May 08) (May 08)

Define Heap, Min-Heap and Max heap. Give examples (Dec 07) Explain interpolation search. (Dec 07) Derive the average case time complexity of sequential search. (Jul 07) Write an algorithm to merge two sorted arrays. (Jul 07) Give the average and worst case time complexities of selection sort, quick sort and merge sort algorithms. (Jan 07) 8. Explain sequential search algorithm. (Jan 07) 9. Essay Questions 1. Explain quicksort algorithm. Discuss average and worst case complexity. (May 08) 2. Explain heapsort algorithm. Trace the algorithm for a sample input. (May 08, (Dec 07, Jan 07) 3. Give the Quick sort algorithm and derive its best case time complexity. Explain the working of Quick Sort with an input set of already sorted numbers. (Dec 07) 4. Write an algorithm to implement Binary search. Use quick sort for sorting part. Mention any two limitations of Binary search. (Jul 07) 5. Give a non-recursive version of merge sort and explain its working. (Jul 07) 6. Explain merge sort algorithm and analyze its time complexity. (Jan 07) 7.

You might also like