PROGRAMMING IN 'C' Year 22

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Roll No. …………………..

BCA–C-201
B. C. A. (Second Semester)
EXAMINATION, 2021-22
DATA STRUCTURE USING ‘C’
1
Time : 2
2
Hours

Maximum Marks : 60
Note : All questions have to be attempted.
Section—A
1. Multiple choice questions : 1 each
(a) Which is the data structure that can’t store the
non-homogeneous data element ? (CO1, BL-I)
(i) Records
(ii) Array
(iii) Pointer
(iv) Stacks
(b) Which is non-linear data structure ? (CO4, BL-II)
(i) Stacks
(ii) List
(iii) Tree
(iv) String

P. T. O.
[2] BCA–C-201

(c) The time complexity of quick sort is :


(CO3, BL-IV)
(i) O (n)
(ii) O (log n)
(iii) O (n2 )

(iv) O (n log n)
(d) Quick sort is also known as : (CO2, BL-III)
(i) Merge sort
(ii) Tree sort
(iii) Shell sort
(iv) Partition and Exchange sort
(e) ................ form of access is used to add and
remove nodes from a queue. (CO4, BL-II)
(i) LIFO
(ii) FILO
(iii) FIFO
(iv) None of the above
(f) An algorithm that calls itself directly or indirectly
is known as : (CO5, BL-II)
(i) Subalgorithm
(ii) Recursion
(iii) Traversal algorithm
(iv) Polish notation
[3] BCA–C-201

(g) A ................ is a linear list in which insertion and


deletion are made to from either end to the
structure. (CO1, BL-I)
(i) Priority queue
(ii) Circular queue
(iii) Dequeue
(iv) Random of queue
(h) A graph is a tree if and only if graph is :
(CO5, BL-II)
(i) Directed graph
(ii) Contains no cycles
(iii) Planar
(iv) Completely connected
(i) A graph in which vertices have equal degree is
known as : (CO2, BL-I)
(i) Simple graph
(ii) Multigraph
(iii) Complete graph
(iv) Regular graph
(j) Minimum number of fields in each node of a
doubly linked list is : (CO4, BL-II)
(i) 2
(ii) 3
(iii) 4
(iv) None of the above

P. T. O.
[4] BCA–C-201

(k) New node are added to the .................. of queue.


(CO2, BL-II)
(i) Front
(ii) Middle
(iii) Back
(iv) Both (i) and (ii)
(l) A hash table is : (CO5, BL-I)
(i) A structure that maps values to keys.
(ii) A structure that maps keys to values.
(iii) A structure used for storage.
(iv) A structure used to implement stack and
queue.
Section—B
2. Attempt any four questions : 3 each
(a) Differentiate between linear and non-linear data
structure. (CO4, BL-IV)
(b) What is sorting ? Explain different types of
sorting. (CO3, BL-II)
(c) Define Searching. Explain different types of
searching. (CO4, BL-I)
(d) Explain Huffman algorithm and its application.
(CO2, BL-II)
(e) What is Polish Notation ? Explain with example.
(CO4, BL-I)
[5] BCA–C-201

3. Attempt any two questions : 6 each


(a) Write an algorithm to add a link at the beginning
of single link list. (CO3, BL-VI)
(b) Write the algorithms to performs different
operations on stack. (CO3, BL-VI)
(c) Write postfix form of the expression :
(CO2, BL-VI)
(A + B) * (C * D – E) * F/G

4. Attempt any two questions : 6 each


(a) Explain Best case, Average case and Worst case
complexities with examples. (CO1, BL-II)
(b) Construct Binary tree whose inorder and preorder
are given as follows : (CO5, BL-VI)
Inorder : 10, 15, 17, 18, 20, 25, 30, 35, 38, 40, 50
Preorder : 20, 15, 10, 18, 17, 30, 25, 40, 35, 38,
50
(c) Construct an AVL tree for the following :
(CO4, BL-VI)
3, 5, 11, 8, 4, 1, 12, 7, 2, 6, 10
5. Attempt any two questions : 6 each
(a) Define the following terms : (CO1, BL-II)
(i) Graph

P. T. O.
[6] BCA–C-201

(ii) Leaf node

(iii) Degree of node

(iv) Weighted graph

(b) Explain selection sort with algorithm.


(CO2, BL-I)

(c) Explain minimum spanning tree with examples.

(CO3, BL-II)

BCA–C-201

You might also like