let numbers = [1, 6, 3, 9, 4, 6]
let min = minElement(numbers) // 1
let position = find(array, min)!
Is there a better way to find the position of the minor element in an array? A loop search, it's fastest in this case.
min = Int.max
for (index,value) in enumerate(array){
if value < min{
min = value
position = index
}
}