Simple bubble sort c#
No, your algorithm works but your Write operation is misplaced within the outer loop. int[] arr = { 800, 11, 50, 771, 649, 770, 240, 9 }; int temp = 0; for (int write = 0; write < arr.Length; write++) { for (int sort = 0; sort < arr.Length – 1; sort++) { if (arr[sort] … Read more