摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one a... 阅读全文
posted @ 2016-01-10 18:39 dylqt 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 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 an... 阅读全文
posted @ 2016-01-10 15:10 dylqt 阅读(144) 评论(0) 推荐(0) 编辑