- 博客(6)
- 收藏
- 关注
原创 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 192
原创 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
原创 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
原创 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 254
原创 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 155
原创 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
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人