Tribhuwan University

Institute of Science and Technology

Model

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.
Differentiate stack with queue? Trace an algorithm for converting infix expression to postfix for the following infix expression: (A+B)*(C$(D-E)+F)-G[10]
2.
What are the advantages and disadvantages of linked list over an array? Discuss algorithms for inserting a node at front position of the linked list and deleting its last item in singly linked list.[10]
3.
Define sorting problem. Trace quick sort algorithm for the following given list of data and also discuss about its time complexity: 78 45 23 89 65 12 90 33[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Define ADT? Explain the benefits of using ADT? [5]
5.
Why circular queue is advantageous over linear queue? Write algorithm for enqueue and is full operation for circular queue. [5]
6.
Define recursive algorithm. Write recursive TOH algorithm? [5]
7.
Is hashing better than binary search algorithm? Give reasons. Define any two collision resolution techniques. [5]
8.
What is a Binary Search Tree? Write an algorithm for searching an item in a binary search tree. [5]
9.
What are the different traversing methods in a binary tree? Explain with a clear example. [5]
10.
What is a circular linked list? How can you traverse all nodes in a singly linked list? [5]
11.
Trace Prim's Algorithm to find minimum spanning tree for the following graph.
question image
[5]
12.
Write short notes on a.) Analysis of Algorithm Write short notes on b.) Representation of Graph [2.5+2.5]