csc211

Data Structures and Algorithms

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

Community

FM: 60 PM: 24

Data Structures and Algorithms

2082 Boards

Section A

Answer any two questions.

1

Distinguish between data type and abstract data type. List any three characteristics of algorithm. Evaluate the postfix expression 33 + 2 * 40 -, using stack.

10

!

2

Define height, depth and level of the tree. Find the minimum spanning tree of the following weighted graph using Kruskal and Prims algorithm.

10

!

3

Define queue as ADT and discuss about primitive operations in queue. Trace the output generated by following recursive function for the statement TOH(4,1,3).

void TOH(int n, int s, int d) {
    if (n == 1) {
        printf(" move the top disk from rod %d to rod %d", s, d);
    } 
    else {
        TOH(n - 1, s, 6 - s - d);
        printf(" move the top disk from rod %d to rod %d", s, d);
        TOH(n - 1, 6 - s - d, d);
    }
}

10

!

Section B

Answer any eight questions.

4

Why do we need algorithms for searching? Trace the binary search operation for the key = 6, in the set {3, 6, 8, 12, 67, 89, 90, 100}

5

!

5

How do you implement single linked list using stack? Explain.

5

!

6

Trace the merge sort algorithm for the input {8, 7, -4, 19, 3, 45, 12}.

5

!

7

Explain about any three hash collision resolution techniques.

5

!

8

Describe the process of deleting the node at start, end and specified position of singly linked list.

5

!

9

Write the algorithm of Quick sort with its efficiency analysis.

5

!

10

Why do we always prefer the worst case for algorithm analysis? Describe the insertion and deletion operation in BST.

5

!

11

Define overflow and underflow. Discuss the advantages and limitations of circular queue.

5

!

12

What are the advantages of circular queue over linear queue? Sort the array {4, 7, 3, 2, 1} using insertion sort.

5

!