Start learning 50% faster. Sign in now
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 )
Select the combination of letters that when sequentially placed in the blanks of the given series will complete the series.
L_UA_Z_N_AP_L_U_PZ
How many letters are there between the first letter of second word from the left end and second letter of second word from the right end in alphabetical...
If all the symbols are dropped from the given arrangement, then which of the following will be the seventh element to the right of “3”?
Select the incorrect term in the alpha-numeric series:
X, Z, B, D, F, G
What series of alphabet place values will be proper to write the word LOAN?
How many such symbols are there in the above series each of which is immediately followed by a number and also immediately preceded by a consonant?
Which of the following letter-clusters will replace the question mark [?] in the given series to make it logically complete?GRM, ETL, [?], AXJ, YZI