Credit:Eli TamangEli Tamang

Tribhuwan University

Institute of Science and Technology

2082

Bachelor Level / Second Year / Third Semester / Science

Bachelors in Information Technology (BIT201)

(Data Structures and Algorithms)

Full Marks: 60

Pass Marks: 24

Time: 3 Hours

Candidates are required to give their answers in their own words as for as practicable.

The figures in the margin indicate full marks.

Section A

Long Answers Questions

Attempt any TWO questions.
[2*10=20]
1.
Why do we need sorting? Trace the Quick sort for the input {12, -9, 56, 23, 4, 8, 6, 9, 23, 21}. [2+8]
2.
Define primitive data type with example. What are the advantages of hashing? With your own example show the hash collision and how do you handle it? Explain. [2+2+6]
3.
Distinguish between static and dynamic list structure. Explain about linked list implementation of stack and queue. [2+8]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Why do we need circular queue? Explain. [5]
5.
Traverse the following graph using BFS and DFS.
question image
[5]
6.
Convert the infix expression 7 * 8 + 10 - 2 to postfix using stack. [5]
7.
Explain the insertion and deletion of a node at first and last position of doubly circular linked list. [5]
8.
Define time and space complexity. Discuss about Round Robin Algorithm for MST. [1+4]
9.
Traverse the following tree in pre-order and in-order.
question image
[5]
10.
Define binary tree and binary search tree. List the applications of Binary tree. [2+3]
11.
List the limitation of recursion. How do you delete the node in BST? [2+3]
12.
What is simple queue? Describe about any three types of graphs. [2+3]