leetcode
文章平均质量分 74
好好刷题的熊孩子
这个作者很懒,什么都没留下…
展开
-
leetcode习题整理——动态规划篇——lc357 Count Numbers with Unique Digits
357. Count Numbers with Unique DigitsGiven a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n.Example:Given n = 2, return 91. (The answer should be the total numbe...原创 2018-06-25 21:48:38 · 196 阅读 · 0 评论 -
leetcode习题整理——动态规划篇——lc413 Arithmetic Slices
A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same.For example, these are arithmetic sequence:1,...原创 2018-06-25 22:10:31 · 156 阅读 · 0 评论 -
leetcode习题整理——动态规划篇——lc343 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 product you can get.For example, given n = 2, return ...原创 2018-06-25 22:32:00 · 255 阅读 · 0 评论 -
leetcode习题整理——动态规划篇——lc375 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 time you guess wrong, I'll tell you whether the number I picked is high...原创 2018-06-26 16:03:18 · 136 阅读 · 0 评论 -
leetcode习题整理——动态规划篇——lc516 Longest Palindromic Subsequence
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000.Example 1:Input:"bbbab" Output:4 One possible longest palindromic subseque...原创 2018-06-26 16:16:41 · 149 阅读 · 0 评论 -
leetcode习题整理——动态规划篇——lc740. Delete and Earn
Given an array nums of integers, you can perform operations on the array.In each operation, you pick any nums[i] and delete it to earn nums[i] points. After, you must delete every element equal to num...原创 2018-06-26 16:30:41 · 194 阅读 · 0 评论