![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
动态规划
Ber03
:)
展开
-
[LeetCode] 118. Pascal's Triangle
原题链接:https://leetcode.com/problems/pascals-triangle/1. 题目介绍Given a non-negative integer numRows, generate the first numRows of Pascal’s triangle.In Pascal’s triangle, each number is the sum of the...原创 2019-12-01 00:05:56 · 198 阅读 · 0 评论 -
[LeetCode] 312. Burst Balloons
原题链接:https://leetcode.com/problems/burst-balloons/1. 题目介绍Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all th...原创 2019-03-05 00:49:30 · 185 阅读 · 0 评论 -
[LeetCode] 213. House Robber II
原题链接: https://leetcode.com/problems/house-robber-ii/House Robber 专题相关题目198. House Robber1. 题目介绍You are a professional robber planning to rob houses along a street. Each house has a certain amount ...原创 2019-02-22 16:08:52 · 199 阅读 · 0 评论 -
[LeetCode] 395. Longest Substring with At Least K Repeating Characters
原题链接: https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/1. 题目介绍Find the length of the longest substring T of a given string (consists of lowercase letters only) su...原创 2019-03-05 17:34:31 · 123 阅读 · 0 评论 -
[LeetCode] 898. Bitwise ORs of Subarrays
原题链接: https://leetcode.com/problems/bitwise-ors-of-subarrays/1. 题目介绍We have an array A of non-negative integers.For every (contiguous) subarray B = [A[i], A[i+1], …, A[j]] (with i <= j), we take...原创 2019-03-02 17:52:46 · 266 阅读 · 0 评论 -
[LeetCode] 96. Unique Binary Search Trees
原题链接: https://leetcode.com/problems/unique-binary-search-trees/1. 题目介绍Given n, how many structurally unique BST’s (binary search trees) that store values 1 … n?给出一个数n,求从1到n的所有数可以形成多少种不一样的二叉树?Examp...原创 2019-03-03 13:32:35 · 169 阅读 · 0 评论 -
[LeetCode] 303. Range Sum Query - Immutable
原题链接: https://leetcode.com/problems/range-sum-query-immutable/1. 题目介绍Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example:Given nums = [-2, ...原创 2019-03-15 01:01:31 · 112 阅读 · 0 评论 -
[LeetCode] 304. Range Sum Query 2D - Immutable
原题链接: https://leetcode.com/problems/range-sum-query-2d-immutable/1. 题目介绍Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and ...原创 2019-03-15 00:58:03 · 124 阅读 · 0 评论 -
[LeetCode] 120. Triangle
原题链接: https://leetcode.com/problems/triangle/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.For example, given th...原创 2019-03-07 22:30:52 · 103 阅读 · 0 评论 -
[LeetCode] 464. Can I Win
原题链接: https://leetcode.com/problems/can-i-win/1. 题目简介In the “100 game,” two players take turns adding, to a running total, any integer from 1…10. The player who first causes the running total to rea...原创 2019-03-12 14:13:55 · 203 阅读 · 0 评论 -
[LeetCode] 64. Minimum Path Sum
原题链接: https://leetcode.com/problems/minimum-path-sum/1. 题目介绍Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers alon...原创 2019-03-12 15:31:42 · 94 阅读 · 0 评论 -
[LeetCode] 935. Knight Dialer
原题链接:1. 题目介绍A chess knight can move as indicated in the chess diagram below:国际象棋中,一个骑士可以按照下面的方法走:This time, we place our chess knight on any numbered key of a phone pad , and the knight makes N-1...原创 2019-03-24 23:49:40 · 286 阅读 · 0 评论 -
[LeetCode] 818. Race Car
原题链接:https://leetcode.com/problems/race-car/1.题目介绍Your car starts at position 0 and speed +1 on an infinite number line. (Your car can go into negative positions.)Your car drives automatically acc...原创 2019-03-25 16:17:04 · 373 阅读 · 0 评论 -
[LeetCode] 139. Word Break
原题链接:https://leetcode.com/problems/word-break/1. 题目介绍Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated...原创 2019-03-23 23:00:16 · 202 阅读 · 0 评论 -
[LeetCode] 95. Unique Binary Search Trees II
原题链接:https://leetcode.com/problems/unique-binary-search-trees-ii/1. 题目介绍Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1 … n.给出一个整数n,返回从1到n的所有数形成...原创 2019-05-19 17:29:31 · 182 阅读 · 0 评论 -
[LeetCode] 198. House Robber
原题链接: https://leetcode.com/problems/house-robber/1. 题目介绍You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint sto...原创 2019-02-19 21:54:40 · 125 阅读 · 0 评论 -
[LeetCode] 91. Decode Ways
原题链接:https://leetcode.com/problems/decode-ways/1. 题目介绍A message containing letters from A-Z is being encoded to numbers using the following mapping:‘A’ -> 1‘B’ -> 2…‘Z’ -> 26Given a no...原创 2019-02-25 14:00:46 · 111 阅读 · 0 评论 -
[LeetCode] 123. Best Time to Buy and Sell Stock III
原题链接:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/1. 题目简介Say you have an array for which the i th element is the price of a given stock on day i.Design an algorithm to find the...原创 2019-02-16 21:47:35 · 185 阅读 · 0 评论 -
[LeetCode] 53. Maximum Subarray
原题链接: https://leetcode.com/problems/maximum-subarray/1. 题目描述Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.E...原创 2019-02-08 18:24:38 · 98 阅读 · 0 评论 -
[LeetCode] 121. Best Time to Buy and Sell Stock
原题链接: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/1. 题目介绍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 compl...原创 2019-02-09 17:30:54 · 170 阅读 · 0 评论 -
[LeetCode] 188. Best Time to Buy and Sell Stock IV
原题链接: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/Buy and Sell Stock专题相关题目121. Best Time to Buy and Sell Stock122. Best Time to Buy and Sell Stock II123. Best Time to Buy and ...原创 2019-02-16 23:30:04 · 146 阅读 · 0 评论 -
[LeetCode] 337. House Robber III
原题链接: https://leetcode.com/problems/house-robber-iii/House Robber 专题相关题目198. House Robber213. House Robber II[337. House Robber III]1. 题目介绍The thief has found himself a new place for his thiever...原创 2019-02-22 18:33:06 · 239 阅读 · 0 评论 -
[LeetCode] 62. Unique Paths
原题链接: https://leetcode.com/problems/unique-paths/1. 题目介绍A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right ...原创 2019-02-22 22:43:22 · 139 阅读 · 0 评论 -
[LeetCode] 650. 2 Keys Keyboard
原题链接: https://leetcode.com/problems/2-keys-keyboard/1. 题目描述Initially on a notepad only one character ‘A’ is present. You can perform two operations on this notepad for each step:Copy All: You can c...原创 2019-02-11 23:28:29 · 144 阅读 · 0 评论 -
[LeetCode] 309. Best Time to Buy and Sell Stock with Cooldown
原题链接: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/Buy and Sell Stock相关题目1. 题目简介Say you have an array for which the ith element is the price of a given stock on day i...原创 2019-02-17 22:37:38 · 143 阅读 · 0 评论 -
[LeetCode] 714. Best Time to Buy and Sell Stock with Transaction Fee
原题链接:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/Buy and Sell Stock专题相关题目121. Best Time to Buy and Sell Stock122. Best Time to Buy and Sell Stock II123. Best...原创 2019-02-17 23:34:36 · 152 阅读 · 0 评论 -
[LeetCode] 63. Unique Paths II
原题链接: https://leetcode.com/problems/unique-paths-ii/1. 题目介绍A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or rig...原创 2019-02-23 00:05:14 · 136 阅读 · 0 评论 -
[LeetCode] 70. Climbing Stairs
原题链接: https://leetcode.com/problems/climbing-stairs/1. 题目描述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...原创 2019-02-23 10:20:06 · 102 阅读 · 0 评论 -
[LeetCode] 746. Min Cost Climbing Stairs
原题链接: https://leetcode.com/problems/min-cost-climbing-stairs/Climbing Stairs专题相关题目70. Climbing Stairs746. Min Cost Climbing Stairs1. 题目介绍On a staircase, the i-th step has some non-negative cost c...原创 2019-02-23 10:57:34 · 120 阅读 · 0 评论 -
[LeetCode] 413. Arithmetic Slices
原题链接: https://leetcode.com/problems/arithmetic-slices/1. 题目介绍A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive ele...原创 2019-02-12 21:12:21 · 162 阅读 · 0 评论 -
[LeetCode] 55. Jump Game
原题链接:https://leetcode.com/problems/jump-game/1. 题目介绍Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your m...原创 2019-02-23 22:23:51 · 113 阅读 · 0 评论 -
[LeetCode] 5. Longest Palindromic Substring
原题链接: https://leetcode.com/problems/longest-palindromic-substring/3. 参考资料https://leetcode.com/problems/longest-palindromic-substring/discuss/2921/Share-my-Java-solution-using-dynamic-programming...原创 2019-02-13 13:26:42 · 120 阅读 · 0 评论 -
[LeetCode] 446. Arithmetic Slices II - Subsequence
原题链接: https://leetcode.com/problems/arithmetic-slices-ii-subsequence/相关题目:413. Arithmetic Slices1. 题目介绍A sequence of numbers is called arithmetic if it consists of at least three elements and if th...原创 2019-02-14 23:29:34 · 288 阅读 · 0 评论