Use this code to get the number of operations from a list size of 10, 30, 50, 70, 100. In C++
bool isSorted = false;
for (int iteration = 1; (iteration < length)="" &&="">
iteration++)
{
isSorted = true; //assume that the sublist is sorted
for (int index = 0; index < length="" -="" iteration;="">
if (list[index] > list[index + 1])
elemType temp = list[index];
list[index] = list[index + 1];
list[index + 1] = temp;
isSorted= false;
}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here