Tribhuwan University

Institute of Science and Technology

2077

Bachelor Level / Second Year / Third Semester / Science

B.Sc in Computer Science and Information Technology (CSC211)

(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.
What is stack? What are the different applications of stack? Explain stack operations with example.[10]
2.
Differentiate between singly linked list and doubly linked list. How do you insert and delete a node from doubly linked list? Explain.[10]
3.
What is shortest path? Explain Dijkstra algorithm for finding shortest path using suitable example.[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Explain algorithm for evaluation of postfix expression using stack. [5]
5.
Write a recursive program to find GCD of two numbers. [5]
6.
What is linked list? How is it different from array? [5]
7.
Hand test bubble sort with array of numbers 53, 42, 78, 3, 5, 2, 15 in ascending order. [5]
8.
What is hashing? Explain concept of hash table and hash function with example. [5]
9.
What is minimum spanning tree? Explain. [5]
10.
What is dynamic memory allocation? Compare data structure with abstract data type. [5]
11.
Explain queue as an ADT. [5]
12.
Write short notes on: a. Tail recursion b. Collision resolution techniques [5]