Unit Test-2 CPDS
Unit Test-2 CPDS
UNIT TEST- II
REN RENGANAYAGI VARATHARAJ COLLEGE OF
CS3353 C PROGRAMMING AND DATA STRUCTURES
ENGINEERING
SALVARPATTI, SIVAKASI – 626 128
Year &Sem: II/III Date:- 07.11.24/AN
Branch : ECE & EEETotal Marks: - 50Marks\Time:- 1.30 B.E/B.Tech Degree Examinations
Hour
___________________________________________________________________
QUESTIONPAPERCODE: CPDS 01
PART A [Answer All Question] 7×2=14
1.State the properties of binary search tree. UNIT TEST- II
2.Convert the infix expression to postfix expression:(A-B/C) *(D/E-F). CS3353 C PROGRAMMING AND DATA STRUCTURES
3.What is the reason for collision in hashing technique?
4.Define hashing with example. Year &Sem: II/III Date:- 07.11.24/AN
5.Sort the following data using insertion sort:3,10,4,2,8,6,5,1. Branch : ECE & EEETotal Marks: - 50Marks\Time:- 1.30
6.What is the time complexity of binary search? Hour
7.What is mean by sorting and write the types of sorting.
PART B [Answer All Question] ____________________________________________________________
3×12=36 PART A [Answer All Question] 7×2=14
8. Construct a binary search tree for the values 1. State the properties of binary search tree.
45, 56, 39, 12, 34, 32, 10, 78, 67, 89, 91. Give the 2. 2.Convert the infix expression to postfix expression:(A-B/C)
pre order and post order traversal of the resultant *(D/E-F).
binary search tree. 3. 3.What is the reason for collision in hashing technique?
9. Consider a hash table with 9 slots. The hash 4. 4.Define hashing with example.
function is h(k) = k mod 9. The following keys are 5. 5.Sort the following data using insertion sort:3,10,4,2,8,6,5,1.
inserted in the order 15, 38, 8, 5, 20, 33, 14, 30. 6. 6.What is the time complexity of binary search?
Draw the contents of the hash table when the 7. 7.What is mean by sorting and write the types of sorting.
collisions are resolved by PART B [Answer All Question] 3×12=36
i) Chaining, ii) Linear Probing, 8. Construct a binary search tree for the values
iii) Double hashing. The second hash function 45, 56, 39, 12, 34, 32, 10, 78, 67, 89, 91. Give the
h2(x) = 7 – (x mod 7). pre order and post order traversal of the resultant
10. i) Sort the following using quick sort: binary search tree.
{88,11,22,44,66,99,67,54,10} and write the algorithm for quick sort 9. Consider a hash table with 9 slots. The hash
function is h(k) = k mod 9. The following keys are
with advantages and disadvantages.
inserted in the order 15, 38, 8, 5, 20, 33, 14, 30.
ii) Perform heap sort on the following array of Draw the contents of the hash table when the
collisions are resolved by
i) Chaining, ii) Linear Probing,
iii) Double hashing. The second hash function
h2(x) = 7 – (x mod 7).
10. i) Sort the following using quick sort:
{88,11,22,44,66,99,67,54,10} and write the algorithm for quick sort
with advantages and disadvantages.
ii) Perform heap sort on the following array of
elements {9,7,5,11,12,2,14,3,10,6} and produce
step by step procedure.
Prepared By Verified by
Approved By