PDA

View Full Version : Bubble Sort (Number of Steps)


webdev
11-05-2009, 10:39 AM
Hello coders, newbie on board! Just a quick question: How do I calculate the number of steps a bubble sort takes to sort a database of n entries? On my notes it is written that "It is easy to see that a bubble sort of n records requires n-1 comparisons on the first pass, n-2 on the second and...