随笔分类 - 动态规划
摘要:1.题目描述 https://www.hackerrank.com/challenges/lego-blocks 2.解法分析 这题乍看一下觉得应该可以用动态规划来做,但是却死活想不到最优子结构,在网上搜了一下,找到一个英文的描述,整理如下。 首先需要明白一点,稍微复杂一点的动态规划不一定能直接找到最优子结构,可能内...
阅读全文
摘要:1.题目描述 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. ...
阅读全文
摘要:1.题目描述 Say you have an array for which the ith element is the price of a given stock on day i. Design an algorith...
阅读全文