Data Structures
Data Structures
of Pages : 02
Total No. of Questions : 18
B.Tech. (CSE)/(IT) (2012 to 2017)
(Sem.–3)
DATA STRUCTURES
Subject Code : BTCS-304
M.Code : 56594
Time : 3 Hrs. Max. Marks : 60
SECTION-A
Write Briefly :
1 | M-56594 (S2)-194
https://www.ptustudy.com
SECTION-B
11. Write an algorithm to implement Quick sort.
12. Are B trees of order 2 are full binary trees? If yes, explain how.
13. Make a binary search tree by considering the following eight numbers :
55, 34, 41, 24, 74, 38, 65, 49
14. Write an Algorithm to traverse a graph using Breadth First Search.
15. Build a heap H from the following list of numbers :
42, 35, 5, 8, 34, 56, 70, 32
SECTION-C
16. Consider an array: 99, 2, 34, 17, 75, 12 Depict the state of the array after each pass if
selection sort is applied.
17. Suppose a binary tree T is in memory. Write non-recursive procedure for each of the
following :
a) Finding the number of nodes in T.
b) Finding the depth D of T.
c) Find the number of terminal nodes in T.
18. a) Suppose weighted graph G is maintained in memory by a node array DATA and
weight matrix W as follows :
0 0 3 0
5 0 1 7
W
2 0 0 4
0 6 8 0
NOTE : Disclosure of Identity by writing Mobile No. or Making of passing request on any
page of Answer Sheet will lead to UMC against the Student.
2 | M-56594 (S2)-194
https://www.ptustudy.com