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 )
IBM in collaboration with NASA unveiled a new geospatial foundation model foe which of the following purposes?
The ‘Vikramshila University’ in Bihar was founded by which of the following kings?
The foremost right among rights to freedom is ________.
What is the maximum age limit for buying new health insurance policies as per the revised guidelines by IRDA in April 2024?
Three numbers are in the ratio 2:3:4 and their HCF is 24. Find the numbers?
'My Life As A Comrade' is the autobiography of whom among the following?
Consider the following statements in regards to the Consumer Protection Act, 2019:
I) It was introduced as a replacement of COPRA, 1986
II...
Which of the following options is incorrect about “National Education Policy 2020”?
Allarakha Qureshi who is popularly known as Alla Rakha, is an Indian __________ player.
In which year was the National Commission for Women established in India?