From bf38b12ddc30c6e396a50e61e3dc342ced28e538 Mon Sep 17 00:00:00 2001 From: Jagdeep Matharu Date: Sun, 31 May 2020 19:58:21 -0400 Subject: [PATCH] Minor change in comment --- Counting Sort/CountingSort.playground/Contents.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Counting Sort/CountingSort.playground/Contents.swift b/Counting Sort/CountingSort.playground/Contents.swift index 839b16bc8..99178f85d 100644 --- a/Counting Sort/CountingSort.playground/Contents.swift +++ b/Counting Sort/CountingSort.playground/Contents.swift @@ -30,7 +30,7 @@ func countingSort(array: [Int]) throws -> [Int] { // Step 3 // Place the element in the final array as per the number of elements before it // Loop through the array in reverse to keep the stability of the new array - // (i.e. 7, is at index 3 and 6, thus in sortedArray the position of 7 at index 3 should be before 7 at index 6 + // i.e. 7, is at index 3 and 6, thus in sortedArray the position of 7 at index 3 should be before 7 at index 6 var sortedArray = [Int](repeating: 0, count: array.count) for index in stride(from: array.count - 1, through: 0, by: -1) { let element = array[index]