private void BubbleSort(long[] inputArray) { for (int iterator = 0; iterator < inputArray.Length; iterator++) { for (int index = 0; index < inputArray.Length - 1; index++) { if (inputArray[index] > inputArray[index + 1]) { Swap(ref inputArray[index], ref inputArray[index+1]); } } } }
0 comments:
Post a Comment