有人用dataplan手机加上hotspot取代家里的网络么# PDA - 掌中宝
j*g
1 楼
Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top
left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down or right at any point in time.
就是这道题,用DP解很简单。但是要维持一个M*N矩阵.
被要求expected time O(M*N), space O(M+N)
请问这个space怎么做到啊。。。。谢啦
Given a m x n grid filled with non-negative numbers, find a path from top
left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down or right at any point in time.
就是这道题,用DP解很简单。但是要维持一个M*N矩阵.
被要求expected time O(M*N), space O(M+N)
请问这个space怎么做到啊。。。。谢啦