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:

Why for bubble sort is the number of iterations of the inner loop not exactly n^2

Author: Will Parker



Answer:

Inner loop iterates (n-1)(n-1) times So the inner loop iterates n^2 -2n +1 times


0 / 5  (0 ratings)

1 answer(s) in total