剑指 Offer II 099. 最小路径之和



func minPathSum(_ grid: [[Int]]) -> Int {

        let row = grid.count
        let col = grid.first?.count ?? 0
        let temp = Array.init(repeating: 0, count: col)
        var dp = Array.init(repeating: temp, count: row)
        for i in 0..

你可能感兴趣的:(剑指 Offer II 099. 最小路径之和)