csc211

Data Structures and Algorithms

Easy Exam Preparation: 2 days
Question Papers (9)
logo

Community

FM: 60 PM: 24

Data Structures and Algorithms

2083 Boards

Section A

Answer any two questions.

1

Differentiate between singly, doubly and circular linked list. How do you insert a new element at the beginning at the specified position and at the end of doubly linked list? Explain.

10

!

2

Is bubble sort internal sort or external sort? Give reason. Apply Quick sort on the data set {12, 7, 9, 24, 8, 2, -8, 11, 4, 3 , 14, 5, 6, -6} to keep them in ascending order.

10

!

3

When does the binary search algorithm perform the worst case? Assume the size of hash table be 7 and the hash function as h(k) = k MOD 7. Now resolve the collisions using Linear probing, Quadratic probing and Double hashing while inserting the elements 17, 8, 24, 11, 15.

10

!

Section B

Answer any eight questions.

4

Differentiate between ADT and data structure. Why do we always do worst case analysis of an algorithm? Justify.

5

!

5

Convert X + Y x Z - ( A / B ) to postfix using stack.

5

!

6

Assume a circular queue of size 5 and then enqueue 4, 9, 5 and then dequeue two elements and enqueue 11.

5

!

7

When do we prefer tail recursion? Demonstrate a program to find the factorial value of given positive integer using tail recursion.

5

!

8

How do you measure efficiency of a sorting algorithm? How do you create a node for circular linked list?

5

!

9

What is the problem with binary search tree? List the primitive operations on queue.

5

!

10

Create an AVL tree for the data {35, 15, 5, 20, 25}.

5

!

11

Find the minimum spanning tree of following graph using Prims algorthm.

 

5

!

12

Write the algorithm for merge sort.

5

!