9 votes 9 votes The number of swappings needed to sort the numbers $8 , 22, 7, 9, 31, 5, 13$ in ascending order using bubble sort is $11$ $12$ $13$ $10$ Algorithms isro2017 algorithms sorting + – sh!va asked May 7, 2017 • edited Dec 4, 2022 by Lakshman Bhaiya sh!va 8.0k views answer comment Share Follow See 1 comment See all 1 1 comment reply chetan_raghav-1995 commented May 7, 2017 reply Follow Share answer to this question is 10 0 votes 0 votes Please log in or register to add a comment.
Best answer 16 votes 16 votes Answer is 10. All swaps are in following order: 8,7,22,9,31,5,13 8,7,9,22,31,5,13 8,7,9,22,5,31,13 8,7,9,22,5,13,31 7,8,9,22,5,13,31 7,8,9,5,22,13,31 7,8,9,5,13,22,31 7,8,5,9,13,22,31 7,5,8,9,13,22,31 5,7,8,9,13,22,31 Rahul Jain25 answered May 7, 2017 Rahul Jain25 comment Share Follow See 1 comment See all 1 1 comment reply joshi_nitish commented May 7, 2017 reply Follow Share thanks for posting earlier otherwise i have to work on it again. 0 votes 0 votes Please log in or register to add a comment.
5 votes 5 votes if we try to simulate the array with given elements then number of swappings by applying Bubble sort =10 akash.dinkar12 answered May 7, 2017 akash.dinkar12 comment Share Follow See all 0 reply Please log in or register to add a comment.
3 votes 3 votes refer https://gateoverflow.in/14398/number-swappings-bubble-least-possible-shortcut-available Azeem answered Nov 27, 2017 Azeem comment Share Follow See 1 comment See all 1 1 comment reply Sahil1994 commented Dec 8, 2017 reply Follow Share thx a lot 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes d.... joshi_nitish answered May 7, 2017 joshi_nitish comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments joshi_nitish commented May 7, 2017 reply Follow Share hope you got. 0 votes 0 votes Rahul-gupta commented May 7, 2017 reply Follow Share 14 but not in the list 0 votes 0 votes princeit07 commented Jun 26, 2021 i edited by princeit07 Jun 26, 2021 reply Follow Share ANSWER is 10. 1 votes 1 votes Please log in or register to add a comment.