Question:
Why can bubble sorts number of iterations be approximated to n^2 times?
Author: Will ParkerAnswer:
As n becomes massive, the number of iterations (n + 1)^2 = (n^2 -2n + 1) tends to just n^2 For large n 2n + 1 is nothing compared to n^2
0 / 5 Â (0 ratings)
1 answer(s) in total