BSC 3 Sem Computer Science (Data Structures) Summer 2018
BSC 3 Sem Computer Science (Data Structures) Summer 2018
com
NJR/KS/18/3097
Bachelor of Science (B.Sc.) Semester-III (C.B.S.) Examination
COMPUTER SCIENCE (DATA STRUCTURES)
Paper—I
Time : Three Hours] [Maximum Marks : 50
N.B. :— ALL questions are compulsory and carry equal marks.
EITHER
1.
3 5
(A) Write an algorithm to insert an element ITEM after element KEY in the double linked
8
list. 5
(B) Explain the representation of linked list in memory. 5
OR
5
83
(C) Write an algorithm to delete the front element of linked list. 5
(D) Write an algorithm to add the two polynomials represented as a linked list. 5
EITHER
2. (A) Explain the quick sort method with suitable example. 5
(B) What is a stack ? Explain its memory representation. Write an algorithm to insert element
in stack. 5
OR
35
(C) Write an algorithm for translating the infix expression into postfix notation. 5
8
(D) Let M and N be integers and suppose F(M, N) is recursively defined by :
1 if M = 0 or M > N ≥ 1
F( M, N) =
F(M – 1, N) + F(M – 1, N – 1) otherwise
Find F(4,2 ) and F(2, 4). 5
EITHER
3. (A) Write on algorithm to delete the element from circular queue. 5
(B) Explain insertion sort method with a suitable example. 5
OR
(C) Write an algorithm for selection sort method. 5
(D) What is priority queue ? Explain the array representation of priority queue in memory.
5
EITHER
4. (A) Traverse the following tree in preorder and postorder. 5
35 5
G
8 B P
8 3
Q A D
C E R
K F H
RQA—33074 1 (Contd.)
www.rtmnuonline.com
rtmnuonline.com
(B) Write an algorithm for Depth first search of graph. 5
OR
(C) What is graph ? Give its memory representation as an array and linked list. 5
(D) Write an algorithm for the inorder traversal of a binary tree. 5
5. Attempt ALL :
(A) Define circular linked list. 2½
(B) Explain the overflow and underflow condition in array representation of stack. 2½
35
(C) Discuss the complexity of selection sort method. 2½
8
(D) Give the adjacency matrix for the following graph. 2½
A B
5
83
om
e.c
lin
on
D
nu
C
rtm
w.
ww
3 5
8
om
e.c
lin
on
nu
rtm
w.
ww
3 5 3 5
8 8
RQA—33074 2 NJR/KS/18/3097
www.rtmnuonline.com