作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 动态规划 日期 题目地址:https://leetcode-cn.com/problems/max-consecutive-ones-ii/ 题目描述 Given a binary array, find the maximum number of consecutive 1s in this array if you can flip at most…
[LeetCode]731. My Calendar II 解题报告(Python) 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址:https://leetcode.com/problems/my-calendar-ii/description/ 题目描述: Implement a MyCalendarTwo class to store your events. A new event can be added if…
[LeetCode]Pascal's Triangle II 解题报告 标签(空格分隔): LeetCode 题目地址:https://leetcode.com/problems/pascals-triangle-ii/description/ 题目描述: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could yo…
[LeetCode]137. Single Number II 解题报告(Python) 标签: LeetCode 题目地址:https://leetcode.com/problems/single-number-ii/description/ 题目描述: Given an array of integers, every element appears three times except for one, which appears exactly once. Find that singl…
[LeetCode]227. Basic Calculator II 解题报告(Python) 标签(空格分隔): LeetCode 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.me/ 题目地址:https://leetcode.com/problems/basic-calculator-ii/description/ 题目描述: Implement a basic calculator to evaluate a simple exp…
[LeetCode]113. Path Sum II 解题报告(Python) 标签(空格分隔): LeetCode 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.me/ 题目地址:https://leetcode.com/problems/path-sum-ii/description/ 题目描述: Given a binary tree and a sum, find all root-to-leaf paths where each…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 虫取法/双指针 日期 题目地址:https://leetcode.com/problems/max-consecutive-ones-iii/ 题目描述 Given an array A of 0s and 1s, we may change up to K values from 0 to 1. Return the length of the l…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 数学方法 日期 题目地址:https://leetcode.com/problems/consecutive-numbers-sum/ 题目描述 Given a positive integer N, how many ways can we write it as a sum of consecutive positive integers? Ex…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 日期 题目地址:https://leetcode.com/problems/smallest-range-ii/description/ 题目描述 Given an array A of integers, for each integer A[i] we need to choose either x = -K or x = K, and add…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 贪心 日期 题目地址:https://leetcode.com/problems/reach-a-number/description/ 题目描述 Given an array of non-negative integers, you are initially positioned at the first index of the array.…