Initial array: a[0] = 210 a[1] = 421 a[2] = 132 a[3] = 343 a[4] = 854 a[5] = 165 a[6] = 276 a[7] = 587 a[8] = 398 a[9] = 109 Sorting: Deal with the value 421, currently stored in a[1] 421 is NOT smaller than 210, stops at position 1 Deal with the value 132, currently stored in a[2] 132 is smaller than 421, move to position 1 132 is smaller than 210, move to position 0 Deal with the value 343, currently stored in a[3] 343 is smaller than 421, move to position 2 343 is NOT smaller than 210, stops at position 2 Deal with the value 854, currently stored in a[4] 854 is NOT smaller than 421, stops at position 4 Deal with the value 165, currently stored in a[5] 165 is smaller than 854, move to position 4 165 is smaller than 421, move to position 3 165 is smaller than 343, move to position 2 165 is smaller than 210, move to position 1 165 is NOT smaller than 132, stops at position 1 Deal with the value 276, currently stored in a[6] 276 is smaller than 854, move to position 5 276 is smaller than 421, move to position 4 276 is smaller than 343, move to position 3 276 is NOT smaller than 210, stops at position 3 Deal with the value 587, currently stored in a[7] 587 is smaller than 854, move to position 6 587 is NOT smaller than 421, stops at position 6 Deal with the value 398, currently stored in a[8] 398 is smaller than 854, move to position 7 398 is smaller than 587, move to position 6 398 is smaller than 421, move to position 5 398 is NOT smaller than 343, stops at position 5 Deal with the value 109, currently stored in a[9] 109 is smaller than 854, move to position 8 109 is smaller than 587, move to position 7 109 is smaller than 421, move to position 6 109 is smaller than 398, move to position 5 109 is smaller than 343, move to position 4 109 is smaller than 276, move to position 3 109 is smaller than 210, move to position 2 109 is smaller than 165, move to position 1 109 is smaller than 132, move to position 0 Sorted array: a[0] = 109 a[1] = 132 a[2] = 165 a[3] = 210 a[4] = 276 a[5] = 343 a[6] = 398 a[7] = 421 a[8] = 587 a[9] = 854