
Dynamic Programming---动态规划
文章平均质量分 69
hitscutee
这个作者很懒,什么都没留下…
展开
-
Range Sum Query - Immutable【数组指定区间内的元素和】
一、题目英文:Range Sum Query - Immutable中文:数组指定区间内的元素和二、内容要求英文:Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.中文:给定一个数组nums,求出索引i和j之间元素的原创 2017-07-27 23:30:19 · 378 阅读 · 0 评论 -
Maximum Subarray【最大子串和问题】【容易】
一、题目英文:Maximum Subarray中文:最大子串和二、内容要求英文:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.中文:在数组中找到子串(至少包含一个数字),使得和是最大的。三、示例例如原创 2017-07-28 09:50:14 · 359 阅读 · 0 评论 -
House Robber【打家劫舍】【容易】
一、题目英文:House Robber中文:打家劫舍二、内容要求英文:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you f原创 2017-07-28 11:58:36 · 414 阅读 · 0 评论 -
Best Time to Buy and Sell Stock 【最佳买卖股票的时间】【容易】
一、题目英文:Best Time to Buy and Sell Stock中文:最佳买卖股票的时间二、内容要求英文:Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to comple原创 2017-07-28 14:03:22 · 444 阅读 · 0 评论 -
Climbing Stairs【爬梯子问题】【容易】
一、题目英文:Climbing Stairs中文:爬梯子二、内容要求英文:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can yo原创 2017-07-28 15:03:09 · 452 阅读 · 0 评论 -
Guess Number Higher or Lower II
一、题目英文:Guess Number Higher or Lower II中文:猜数字大小二、内容要求英文:We are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every ti原创 2017-07-28 21:12:58 · 247 阅读 · 0 评论 -
Maximum Length of Pair Chain【双链的最大长度】
一、题目英文:Maximum Length of Pair Chain中文:双链的最大长度二、内容要求英文:You are given n pairs of numbers. In every pair, the first number is always smaller than the second number.Now, we define a pa原创 2017-07-28 15:41:36 · 595 阅读 · 0 评论 -
Coin Change【硬币找零】
一、题目英文:Coin Change中文:硬币找零二、内容要求英文:You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need原创 2017-07-28 20:54:19 · 654 阅读 · 0 评论