The algorithm for a bubble sort of n items is given below.
for i = 1 to n-1
for j = 1 to (n-i)
if numbers [j] > numbers[j+1]
# Swap the names in the array
temp = numbers[j]
numbers[count] = numbers[count+1]
numbers[count+1] = temp
endif
next j
next i
(a) Calculate the number of steps needed to sort a list of 5 items. Count the IF statement in the inner loop as one statement. [2]
I don't know how to do this. What exactly is a 'step'? Thank you