2/H–80 (v) (Syllabus–2015) ( 2 )
2021 (b) Write short notes on the following : 2×2=4
( July ) (i) Circular linked list
(ii) Doubly linked list
COMPUTER APPLICATION
UNIT—II
( Honours )
3. (a) What do you understand by stack
( Data Structure in C ) overflow and stack underflow? Write an
algorithm to implement a stack using a
( BCA–202 ) linear array that checks for stack
Marks : 45 overflow and stack underflow conditions
before inserting and deleting elements
Time : 2 hours from it. 2+4=6
The figures in the margin indicate full marks
(b) What is a circular queue? How do they
for the questions
differ from dequeues? 2+1=3
Answer one question from each Unit
4. (a) What is linear queue? Write an
UNIT—I algorithm to insert and delete data
element from the queue. 1+5=6
1. (a) Explain, with example, the five basic
data structure operations. 5 (b) Convert the following infix expressions
into postfix expressions : 1½×2=3
(b) Discuss the complexity of linear search
algorithm. 2 (i) (A - B) * (C + D)
(ii) (A + B) /(C * D) - (D + E)
(c) Define time and space complexity of an
algorithm. 2 UNIT—III
5. (a) Give an algorithm for a non-recursive
2. (a) Explain how linked list is represented in in-order traversal of a binary tree.
memory. Write an algorithm to delete an Differentiate between height and depth
element from a linked list. 2+3=5 of a tree node. 4+2=6
20D/1150 ( Turn Over ) 20D/1150 ( Continued )
( 3 ) ( 4 )
(b) Find the post-order traversal for the 8. (a) Construct an adjacency matrix for the
following binary trees : 3 following figures : 2½×2=5
A 5
1 4
B 1 4
D (i) (ii) 2 5
C
H 3 6
E F G 2 3
L
I J K
(b) Write an algorithm to find the location of
the first node of a graph containing a
6. (a) Write an algorithm to find the location of
given item. 4
a particular item and if the item does
not exist, then to insert it in its
appropriate place in binary search tree. 5 UNIT—V
(b) Write short notes on any two of the
9. What is hashing? Why do collisions occur in
following : 2×2=4
hashing and how can they be resolved using
(i) AVL tree linear probing and double hashing? 2+2+5=9
(ii) B tree
(iii) Complete binary tree 10. (a) Write a C function to perform selection
sort. 4
UNIT—IV (b) Explain the working principle of bubble
sort algorithm. What is the complexity
of the algorithm? 4+1=5
7. Write the algorithms for traversing a graph
using—
(a) depth first search;
HHH
(b) breadth first search. 4½+4½=9
20D/1150 ( Turn Over ) 20D—PDF/1150 2/H–80 (v) (Syllabus–2015)