// Bubble sort algorithm for MAX elements // in a Monitored array, a. #include #include "array.h" void swap (int, int); extern MArray a; void bubble (int n) { int bound = n-1; int t; // Control order of operand evaluation. July '01. int left, right; while (bound) { t = 0; for (int i=0; iright) { swap (i+1, i); t = i; } } bound = t; } }