SEARCH
You are in browse mode. You must login to use MEMORY

   Log in to start


From course:

Computer Science AQA A level

» Start this Course
(Practice similar questions for free)
Question:

Give a way to optimise a bubble sort algotihm

Author: Will Parker



Answer:

The inner loop takes into account that after each pass the last non sorted index place is sorted so there's no need to loop ​to that point again Also a recognistion (through a variable called swapped maybe) of when the algrothm has sorted the problem so no unnecessary additional passing through is done


0 / 5  (0 ratings)

1 answer(s) in total