### CS1201 DATA STRUCTURES Questions Bank 2014

Anna University, Chennai

M.A.M. SCHOOL OF ENGINEERING

SIRUGANUR,TRICHY-621105

(An ISO 9001:2008 Certified Institution)

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

YEAR / SEM : II / III

CS1201 DATA STRUCTURES

UNIT- I- FUNDAMENTALS OF ALGORITHMS

PART – A

1. Write down the definition of data structures?

2. Give few examples for data structures?

3. Define Algorithm?

4. What are the features of an efficient algorithm?

5. List down any four applications of data structures?

6. What is divide and conquer?

7. State the importance of dynamic programming

8. Define storage structure?

9. Define file structure?

10. What are the four major parts in an iterative process?

11. Write down the algorithm for solving Towers of Hanoi problem?

12. What are the different types of data structures?

13. What do you mean by primitive data structure?

14. What are the three stages of problem solving aspect.

15. Define depth of recursion?

16. What is searching?

17. What is Linear search?

18. Define Space Complexity

19. Define Time Complexity

20. What are asymptotic notations?

21. What is information?

22. Define Recursion?

23. What is a Fibonacci sequence?

PART – B

1. Explain in detail the steps involved in Top down Design. (16)

2. Write the verification condition of a program segments with i) Straight line statements (4)

ii) Branches (6)

iii) Loops (6)

3. Write short notes on efficiency of an algorithm (16)

4. Write short notes on analysis of an algorithm (16)

5. (a) Develop an algorithm to compute the sums for the first n terms

S=1+ (1/2) + (1/3) +…. (8)

(b) Discuss in detail about the implementation of the algorithm. (8)

6. (a) Write an algorithm to reverse the digits of a decimal number. (8) (b) Write an algorithm to compute the Fibonacci series for ‘n’ terms. (8)

UNIT- II- FUNDAMENTALS OF DATA STRUCTURES

PART – A

1. What is an Abstract Data type (ADT)? Explain?

2. What is a Stack?

3. What are the two operations of Stack?

4. Write postfix from of the expression –A+B-C+D?

5. What is a Queue?

6. What is a Priority Queue?

7. What are the different ways to implement list?

8. What are the advantages in the array implementation of list?

9. What is a linked list?

10. Name the two fields of Linked list?

11. What is a doubly linked list?

12. Name the three fields of Doubly Linked list?

13. Define double circularly linked list?

14. What is the need for the header?

15. List three examples that uses linked list?

16. Give some examples for linear data structures?

17. Write postfix from of the expression –A+B-C+D?

18. How do you test for an empty queue?

19. What are the postfix and prefix forms of the expression?

20. Explain the usage of stack in recursive algorithm implementation?

21. Write down the operations that can be done with queue data structure?

22. What is a circular queue?

PART – B

1. Write a program in C to return the position of an element X in a List L. (16)

2. (a) State & explain the algorithm to perform Radix Sort. (8)

(b) Write a Program in C to create an empty stack and to push an element into it. (8)

3. Explain how queues can be implemented using Arrays (16)

4. (a) Write a ‘c’ program to multiply two polynomials. (8) (b) Write a ‘c’ program to add two polynomials. (8)

5. (a) Write an algorithm to convert infix to postfix expression and explain it with example (8) (b) Write an algorithm to evaluate a postfix expression and explain it with example (8)

6. (a) Write an algorithm to check given expression contains balanced Parenthesis or not. (8) (b) Write an algorithm for insertion and deletion operation in a circular queue (8)

UNIT III- TREES

PART – A

1. Define non-linear data structure?

2. Define tree?

3. Define leaf?

4. What is meant by directed tree?

5. What is an ordered tree?

6. What is a Binary tree?

7. What are the applications of binary tree?

8. What is meant by traversing?

9. What are the different types of traversing?

10. What are the two methods of binary tree implementation?

11. Define pre-order traversal?

12. Define post-order traversal?

13. Define in -order traversal?

14. What is the length of the path in a tree?

15. Define expression trees?

16. Define strictly binary tree?

17. Define complete binary tree?

18. What is an almost complete binary tree?

19. Define AVL Tree

20. Define collision resolution

PART – B

1. (a) Construct an expression tree for the expression A+(B-C)*D+(E*F) (8) (b) Write a function to delete the minimum element from a binary heap (8)

2. Write a program in C to create an empty binary search tree & search for an element X in it. (16)

4. Explain in detail insertion into AVL Trees (16)

5. Write a recursive algorithm for binary tree traversal with an example. (16)

6. Write an algorithm for initializing the hash table and insertion in a separate Chaining (16)

7. State & explain the algorithm to perform Heap sort. Also analyze the time Complexity of the algorithm (16)

8. Write a C program to perform Merge sort and analyze time complexity of the Algorithm. (16)

9. State & explain the algorithm to perform Quick sort. Also analyze the time complexity of the algorithm. (16)

10. State & explain the algorithm to perform Shell sort. Also analyze the time complexity of the algorithm. (16)

UNIT-IV- GRAPHS AND THEIR APPLICATIONS

PART – A

1. Define Graph?

3. What is a directed graph?

4. What is an undirected graph?

5. What is a loop?

6. What is a simple graph?

7. What is a weighted graph?

8. Define out degree of a graph?

9. Define indegree of a graph?

10. Define path in a graph?

11. What is a simple path?

12. What is a cycle or a circuit?

13. What is an acyclic graph?

14. What is meant by strongly connected in a graph?

15. When is a graph said to be weakly connected?

16. What is meant by sorting?

17. What are the two main classifications of sorting based on the source of data?

18. What is meant by external sorting?

19. What is meant by internal sorting?

20. What are the various factors to be considered in deciding a sorting algorithm?

21. What is the main idea behind insertion sort?

22. What is the main idea behind selection sort?

23. What is the basic idea of shell sort?

24. What is the other name for shell sort?

25. What is the purpose of quick sort?

PART – B

1. Formulate an algorithm to find the shortest path using Dijkstra’s algorithm and explain with example. (16)

2. Explain the minimum spanning tree algorithms with an example. (16)

3. (a) Write short notes on Biconnectivity. (8)

(b) Write an algorithm for Topological Sort of a graph. (8)

4. Write and explain weighted and unweighted shortest path algorithm (16)

5. Explain the various applications of Depth First Search. (16)

UNIT-V- STORAGE MANAGEMENT

PART- A

1. Types of automatic list management?

2. What do you meant by Reference count method?

3. What is Garbage collection

4. What is compaction?

5. Give the purpose of list management?

6. What are the disadvantages of reference count method?

7. What are the phases of garbage collection?

8. What do you mean by thrashing?

9. What are the types of pointers?

10. What are methods of implementing add on and tail operations in linked list?

11. Define first fit

12. Define best fit.

13. Define worst fit.

14. What is internal and external fragmentation?

15. What are the types of buddy system?

PART – B

1. Explain the linked list representation of a list with an example. (16)

2. Explain reference count method with an example. (16)

3. Explain garbage collection with their variations. (16)

4. Explain the dynamic memory management with necessary methods. (16)