Each frame (1/30 second) is one comparing and sorting cycle Bubble Sort is the simplest sorting algorithm, and thus, being extremely inefficient. This is because this algorithm go through every single combination, so in this case: 400^2 = 160k comparisons.