Sorting Algorithms _ DPP 01
Sorting Algorithms _ DPP 01
CS & IT
Algorithms DPP: 1
Sorting Algorithms
I 50 160 90 65 55 I I I I
What is result after 3rd pass of bubble sort?
45185 1 12 I (A) n -1
(B) n(n-l)
(C) n
2
�I 1
Q (A) 56,23,12,8,5,101,55,785,934
4 �
-11--,01-20---r- 5 -
1
o""T"""l 6-0 -r-- 7--,0 6 5----.- 5- 5--r- 2- 5
1 1
.--
1 1
15
---,
(B) 56,23,12,8,5,101,555,785,999,934
(C) 5,8,12,23,56 101,785,555,934,999
How many swaps are needed to sort the array by (D) 5,8,12,23,56,101,555,785,934,999
using is sertion sort __?
CUSTOMER
SlllVKE
Android App I iOS App I PW Website