Question
5,1,4,2,8 how many more pass are needed to finish
sorting by bubble sorting technique?Solution
First Pass: ( 5 1 4 2 8 ) –> ( 1 5 4 2 8 ), Here, algorithm compares the first two elements, and swaps since 5 > 1. ( 1 5 4 2 8 ) –> ( 1 4 5 2 8 ), Swap since 5 > 4 ( 1 4 5 2 8 ) –> ( 1 4 2 5 8 ), Swap since 5 > 2 ( 1 4 2 5 8 ) –> ( 1 4 2 5 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 ) ( 1 4 2 5 8 ) –> ( 1 2 4 5 8 ), Swap since 4 > 2 ( 1 2 4 5 8 ) –> ( 1 2 4 5 8 ) ( 1 2 4 5 8 ) –> ( 1 2 4 5 8 ) Now, the array is already sorted, but our algorithm does not know if it is completed. The algorithm needs one whole pass without any swap to know it is sorted. Third Pass: ( 1 2 4 5 8 ) –> ( 1 2 4 5 8 ) ( 1 2 4 5 8 ) –> ( 1 2 4 5 8 ) ( 1 2 4 5 8 ) –> ( 1 2 4 5 8 ) ( 1 2 4 5 8 ) –> ( 1 2 4 5 8 )
What will come in place of β?β in the following equation, if β+β and βββ are interchanged and βΓβ and βΓ·β are interchanged?
...Which of the following interchanges of numbers (not the digits of the numbers) would make the given equation correct?
16 Γ 12 Γ· 4 + 8 β 16 = ...
Select the option that is related to the third term in the same way as the second term is related to the first term.
Kilogram : Mass :: Kilometre...

Choose the next number in the series.
15, 27, 51, 99, 195,?
Thickness of 8 tyres L, M, N, O, P, Q, R and S is compared. Thickness of no two tyres is same.Thickness of N is more than L but less than 6 tyres. Thick...
18 is related to 80 following a certain logic. Following the same logic, 23 is related to 100. To which ofthe following is 36 related, following the sam...
Read the given statements and conclusions carefully. Assuming that the information given in the statements is true, even if it appears to be at varianc...
There are seven persons Anand, Bipin, Chaman, Deepak, Eashan, Farhan and Gagan are sitting around a circular table but not necessarily in same order. Ea...
If 2 is added to each odd digit and 1 is subtracted from each even digit in the number 34135278, what will be the sum of the digits that are third from ...