class Solution {
func twoSum(_ numbers: [Int], _ target: Int) -> [Int] {
var cnt: Int = numbers.count - 1
var num1: Int = numbers[0]
var num2: Int = numbers[cnt]
if cnt == 1 {
return [1,2]
}
for i in 0...cnt {
num2 = numbers[cnt - i]
for j in 0..<cnt - i {
num1 = numbers[j]
if num1 + num2 == target {
return [j + 1, cnt - i + 1]
}
}
}
return [0]
}
}