// Funtion that swaps array values void swap(int &a, int &b){ int temp = a; a = b; b = temp; } // the "&" is very important, since arrays are not mutable we // use this operator to swap memory addresses