343. Integer Break

Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pr...

2017-09-01 09:37:49

阅读数:177

评论数:0

413. Arithmetic Slices(等差级数)

标签(空格分隔): leetcode dpA sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consec...

2017-08-24 22:56:48

阅读数:158

评论数:0

70. Climbing Stairs(登高)

标签(空格分隔): leetcode dpYou 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 dis...

2017-08-24 21:45:38

阅读数:95

评论数:0

121. Best Time to Buy and Sell Stock

标签(空格分隔): leetcode dpSay 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 complete at...

2017-08-24 21:19:03

阅读数:125

评论数:0

198. House Robber(入室强盗)

标签(空格分隔): leetcode dpYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only ...

2017-08-24 20:54:32

阅读数:112

评论数:0

53. Maximum Subarray(最大子序列)

标签(空格分隔): leetcode dp#Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the ...

2017-08-24 20:53:47

阅读数:114

评论数:0

303. Range Sum Query - Immutable

标签(空格分隔): leetcode dp范围和查询-不可变的Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example:Given nu...

2017-08-24 20:52:51

阅读数:91

评论数:0

12. Integer to Roman

Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.给定一个整数,将它转换成一个罗马数字。 输入是保证在范围从1到3999。罗马数字...

2017-08-24 20:52:02

阅读数:181

评论数:0

11. Container With Most Water

标签(空格分隔): leetcode给定n个非负整数a1,a2,…,an,其中每个表示坐标(i,ai)处的点。绘制n条垂直线,使得线i的两个端点在(i,ai)和(i,0)处。找到两条线,它们与x轴一起形成一个容器,找到两条线,它们与x轴一起形成一个容器,使得容器含有最多的水。 注意:您不能倾斜容...

2017-08-24 20:51:31

阅读数:117

评论数:0

9. Palindrome Number(回文数)

确定一个整数是否是回文。做这个没有额外的空间。 一些提示: 1.负数是否是回文:(ie, -1) 2.如果您正在考虑将整数转换为字符串,请注意使用额外空间的限制。 3.您也可以尝试反转一个整数。但是,如果您已经解决了“反向整数”问题,则知道反向整数可能会溢出。你会如何处理这种情况? 4....

2017-08-10 21:25:08

阅读数:97

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭