Q. No. 3
a) What is the time complexity of bubble sort if All data/keys are equal.
b) Apply Insertion Sort on the following data. Also show its Time complexity.
(marks= 2+4+4=8)
Index
0
1
2
3
4
5
6
7
8
6
Data
50
25
10
5
7
1
3
4
60
c) You are given an empty hash table of size 7 that uses chaining method. The following sequence of
keys is to be inserted:
22, 9, 8, 23, 2, 3, 5, 24, 30, 35, 9, 8
Insert these keys into hash table and count number of collisions.