LeetCode 888 Fair Candy Swap 解题报告
题目要求Alice and Bob have candy bars of different sizes: A[i] is the size of the i-th bar of candy that Alice has, and B[j] is the size of the j-th bar o...
【LeetCode】Permutations 解题报告
全排列问题。经常使用的排列生成算法有序数法、字典序法、换位法(Johnson(Johnson-Trotter)、轮转法以及Shift cursor cursor* (Gao & Wang)法。【题目】Given a collection of numbers, return all poss...
【LeetCode】56. Merge Intervals 解题报告(Python & C++ & Java)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/目录题目描述题目大意解题方法日期题目地址:https://leetcode.com/problems/merge-intervals/#/description题目描述Given a col...
LeetCode: Sort Colors 解题报告
Sort ColorsGiven an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the ...
【LeetCode】435. Non-overlapping Intervals 解题报告(Python)
【LeetCode】435. Non-overlapping Intervals 解题报告(Python)作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/题目地址:https://leetcode.com/problems/non-o...
【LeetCode】915. Partition Array into Disjoint Intervals 解题报告(Python)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/题目地址: https://leetcode.com/problems/partition-array-into-disjoint-intervals/description/题目描述:Gi...
LeetCode 762 Prime Number of Set Bits in Binary Representation 解题报告
题目要求Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary representa...
LeetCode: Permutations 解题报告
PermutationsGiven a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1...
【LeetCode】814. Binary Tree Pruning 解题报告(Python & C++)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/目录题目描述题目大意解题方法后序遍历日期题目地址:https://leetcode.com/problems/binary-tree-pruning/description/题目描述We a...
LeetCode 349 Intersection of Two Arrays 解题报告
题目要求Given two arrays, write a function to compute their intersection.题目分析及思路给定两个数组,要求得到它们之*同拥有的元素列表(列表中元素是唯一的)。可以将所给数组转成集合,利用集合的交集的概念,最后将结果转成列表即可。pyt...
【leetCode百题成就】Gas Station解题报告
题目:There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it co...
【LeetCode】537. Complex Number Multiplication 解题报告(Python & C++)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/目录题目描述解题方法日期题目地址:https://leetcode.com/problems/complex-number-multiplication/description/题目描述Gi...
【LeetCode】1085. Sum of Digits in the Minimum Number 解题报告(C++)
作者: 负雪明烛id: fuxuemingzhu个人博客:http://fuxuemingzhu.cn/目录题目描述题目大意解题方法遍历日期题目地址:https://leetcode-cn.com/problems/sum-of-digits-in-the-minimum-number/题目描述Gi...
LeetCode: Path Sum II 解题报告
Path Sum IIGiven a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tr...
【LeetCode】Island Perimeter 解题报告
【LeetCode】Island Perimeter 解题报告[LeetCode]https://leetcode.com/problems/island-perimeter/Total Accepted: 16143Total Submissions: 28552Difficulty: EasyQ...
【LeetCode】120. Triangle 解题报告(Python)
【LeetCode】120. Triangle 解题报告(Python)作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/题目地址https://leetcode.com/problems/triangle/description/题目描述...
[Leetcode] 819. Most Common Word 解题报告
题目: Given a paragraph and a list of banned words, return the most frequent word that is not in the list of banned words. It is guaranteed there is at...
【LeetCode】819. Most Common Word 解题报告(Python)
【LeetCode】819. Most Common Word 解题报告(Python) 标签(空格分隔): LeetCode 题目地址:https://leetcode.com/problems/most-common-word/description/ 题目描述: Given a p...
【LeetCode】831. Masking Personal Information 解题报告(Python)
【LeetCode】831. Masking Personal Information 解题报告(Python)标签(空格分隔): LeetCode作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.me/题目地址:https://leetco...
【LeetCode】108. Convert Sorted Array to Binary Search Tree 解题报告 (Java & Python)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/目录题目描述题目大意解题方法Java解法Python解法日期题目地址:https://leetcode.com/problems/convert-sorted-array-to-binary...