leetcode:Minimum Path Sum(路线上元素和的最小值)【面试算法题】
摘要:
题目:Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:You can only move either down or right at any point in time.题意从左上到右下,所有可能的路径中,求经过的元素和最小值。动态规划基础题了,dp每个状态由左边或者上边的值中,较小的值与当前状态的值相加得到。注意考虑边界情况就行了。 int d 阅读全文
posted @ 2013-09-27 18:47 新一 阅读(158) 评论(0) 推荐(0)
浙公网安备 33010602011771号