void Swap(int & numA, int & numB) // This function takes two integer variables // ('numA', 'numB') and interchanges (swaps) them. { int temp; // Temporary variable used during swap temp = numA; numA = numB; numB = temp; } void BubbleSort(apvector & list) // This function uses a Bubble Sort to sort an array // ('list') of integers in non-decreasing order. { for (int i=0; i list[j+1]) Swap(list[j], list[j+1]); }