![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
错题集
文章平均质量分 55
qq_24436311
这个作者很懒,什么都没留下…
展开
-
62. Unique Paths
62. Unique Paths62. Unique Paths问题描述问题描述 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 r...原创 2018-08-03 16:48:21 · 92 阅读 · 0 评论 -
279. Perfect Squares 338. Counting Bits
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n. Input: n = 12 Output: 3 Explanation: 12 = 4 + 4 + 4.两个思考方向: 1...原创 2018-08-03 15:53:51 · 96 阅读 · 0 评论 -
96. Unique Binary Search Trees
DP中需要用到子问题外信息的情况分析DP中需要用到子问题外信息的情况分析问题描述问题描述 Given n, how many structurally unique BST’s (binary search trees) that store values 1 … n? Input: 3 Output: 5 Explanation: ...原创 2018-08-03 15:30:14 · 80 阅读 · 0 评论 -
363. Max Sum of Rectangle No Larger Than K ,由之引申出的三个问题
363. Max Sum of Rectangle No Larger Than K ,由之引申出的三个问题目录363. Max Sum of Rectangle No Larger Than K ,由之引申出的三个问题目录最大连续子数组和<=k最大子数组和2d到1d的转化本Markdown编辑器使用[StackEdit][6]修改而来,用它写博...原创 2018-07-30 17:29:23 · 199 阅读 · 0 评论 -
368. Largest Divisible Subset
368. Largest Divisible Subset Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or Sj % Si = 0. ...原创 2018-08-07 16:43:49 · 114 阅读 · 0 评论 -
5. Longest Palindromic Substring
细节错误: expand函数里返回值时候小减大; 以及边界写成>0原创 2018-08-02 16:08:38 · 184 阅读 · 0 评论 -
44. Wildcard Matching
Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for ‘?’ and ‘*’. ‘?’ Matches any single character. ‘*’ Matches any sequence of characters (includ...原创 2018-08-06 17:10:06 · 133 阅读 · 0 评论 -
413. 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: A = [1, 2, 3, 4] re...原创 2018-08-06 11:08:36 · 77 阅读 · 0 评论 -
97. Interleaving String
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. Input: s1 = “aabcc”, s2 = “dbbca”, s3 = “aadbbcbcac” Output: true两字符串构成第三个的基本都是从dp的角度考虑,分析时发现给定s1,s2已经使用的长度,我们...原创 2018-08-05 22:54:36 · 92 阅读 · 0 评论 -
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 product you can get. For example, given n = 2, ...原创 2018-08-05 20:02:11 · 90 阅读 · 0 评论 -
264. Ugly Number II
Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Input: n = 10 Output: 12 Explanation: 1, 2, 3, 4, 5, 6, 8, 9, ...原创 2018-08-05 17:48:30 · 143 阅读 · 0 评论 -
95. Unique Binary Search Trees II
Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1 … n. Example: Input: 3 Output: [ [1,null,3,2], [3,2,null,1], [3,1,nul...原创 2018-08-05 16:46:28 · 100 阅读 · 0 评论 -
91. Decode Ways
A message containing letters from A-Z is being encoded to numbers using the following mapping: ‘A’ -> 1 ‘B’ -> 2 … ‘Z’ -> 26 Given a non-empty string containing only digits,...原创 2018-08-05 16:24:29 · 107 阅读 · 0 评论 -
224. Basic Calculator
Implement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parentheses ), the plus + or minus sign -, non-negative integers and emp...原创 2018-08-05 16:18:32 · 167 阅读 · 0 评论 -
410. Split Array Largest Sum
410. Split Array Largest Sum Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algorithm to minimize ...原创 2018-08-09 11:11:55 · 157 阅读 · 0 评论 -
3. Longest Substring Without Repeating Characters
3. Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. Example 1: Input: “abcabcbb” Output: 3 Expla...原创 2018-08-20 15:24:13 · 107 阅读 · 0 评论