Fix a typo in 01_selection_sort.swift (#76)
This commit is contained in:
committed by
Aditya Bhargava
parent
68a20e35eb
commit
c55036458e
@@ -4,7 +4,7 @@ import Foundation
|
|||||||
func findSmallestIndex <T: Comparable> (_ arr: [T]) -> Int {
|
func findSmallestIndex <T: Comparable> (_ arr: [T]) -> Int {
|
||||||
// Stores the smallest value
|
// Stores the smallest value
|
||||||
var smallest = arr[0]
|
var smallest = arr[0]
|
||||||
// We don't need any calculation if the array lenght is 1
|
// We don't need any calculation if the array length is 1
|
||||||
if arr.count == 1 {
|
if arr.count == 1 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user