Tony's Log

Algorithms, Distributed System, Machine Learning

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2014年8月3日

摘要: An intuitive 2D DP: dp[i][j] = min(grid[i-1][j-1] + dp[i-1][j], grid[i-1][j-1] + dp[i][j+1])class Solution {public: int minPathSum(vector > &grid) ... 阅读全文
posted @ 2014-08-03 07:30 Tonix 阅读(194) 评论(0) 推荐(0)

摘要: Corner cases!class Solution {public: ListNode *deleteDuplicates(ListNode *head) { if (!head) return head; if (!head->next) return hea... 阅读全文
posted @ 2014-08-03 07:04 Tonix 阅读(171) 评论(0) 推荐(0)

摘要: Nothing special. A typical list manipulation problem.class Solution {public: ListNode *partition(ListNode *head, int x) { if (!head) return ... 阅读全文
posted @ 2014-08-03 06:39 Tonix 阅读(131) 评论(0) 推荐(0)