I think my idea is quite clear, but this is wrong. I can't figure out which part of my code is wrong.

```
func minimumTotal(triangle: [[Int]]) -> Int {
var myT = Array(count: triangle.count, repeatedValue: 0)
if triangle.count == 1 {
return triangle[0][0]
}
myT[0] = triangle[0][0] + triangle[1][0]
myT[1] = triangle[0][0] + triangle[1][1]
for row in 2..<triangle.count {
myT[row] = triangle[row][row] + myT[row-1]
for col in 1..<triangle[row].count-1 {
if col != 0 && col != row {
myT[col] = triangle[row][col] + min(myT[col-1], myT[col])
}
}
myT[0] = triangle[row][0] + myT.first!
}
return myT.minElement()!
}
```