5,1,4,2,8 how many more pass are needed to finish sorting by bubble sorting technique?
First Pass: (5 1 4 2 8 ) –> (1 5 4 2 8 ), Here, algorithm compares the first two elements, and swaps since 5 > 1. ( 15 4 2 8 ) –> ( 14 5 2 8 ), Swap since 5 > 4 ( 1 45 2 8 ) –> ( 1 42 5 8 ), Swap since 5 > 2 ( 1 4 25 8 ) –> ( 1 4 25 8 ), Now, since these elements are already in order (8 > 5), algorithm does not swap them. Second Pass: (1 4 2 5 8 ) –> (1 4 2 5 8 ) ( 14 2 5 8 ) –> ( 12 4 5 8 ), Swap since 4 > 2 ( 1 24 5 8 ) –> ( 1 24 5 8 ) ( 1 2 45 8 ) –> ( 1 2 45 8 ) Now, the array is already sorted, but our algorithm does not know if it is completed. The algorithm needs onewhole pass withoutany swap to know it is sorted. Third Pass: (1 2 4 5 8 ) –> (1 2 4 5 8 ) ( 12 4 5 8 ) –> ( 12 4 5 8 ) ( 1 24 5 8 ) –> ( 1 24 5 8 ) ( 1 2 45 8 ) –> ( 1 2 45 8 )
18, 25, 33, 42, 52, 63, ?
3Â Â Â Â Â Â Â Â Â Â Â Â Â Â 25Â Â Â Â Â Â Â Â Â Â Â 173Â Â Â Â Â Â Â Â Â 1041Â Â Â Â Â Â Â 5201Â Â Â Â Â Â Â 20809
10       a Â...
800 400 600 1500 ? 23625
...16, 8, 8, ?, 24, 60
21, 63, 315, ?, 19845, 218295
5 29 ? 569 1703 3401
...13     26      78      ?     468     936
...If 10 9 38 x 5428
Then, 2x² + 1 = ?
...640 320 160 ? 40 20
12Â Â Â Â Â Â Â Â Â Â 8Â Â Â Â Â Â Â Â Â Â Â Â Â 6Â Â Â Â Â Â Â Â Â Â Â Â Â 12Â Â Â Â Â Â Â Â Â Â 4.5Â Â Â Â Â Â Â Â Â 15
18Â Â Â Â Â Â Â...