Given n points in the plane that are all pairwise distinct, a “boomerang” is a tuple of poi…
分类:LeetCode题目解答
LeetCode | Remove Duplicates from Sorted Array II
题目: Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice? For exam…
[LeetCode] Binary Tree Tilt 二叉树的坡度
Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defin…
[LeetCode] Strange Printer 奇怪的打印机
There is a strange printer with the following two special requirements: The printer can only print a se…
LeetCode 077 Combinations
题目描述 Given two integers n and k, return all possible combinations of k numbers out of 1 … n. For example, If n…
[Leetcode] Substring with Concatenation of All Words 单词组合子字符串
Substring with Concatenation of All Words You are given a string, s, and a list of words, words, that are all …
[Leetcode] Implement strStr() 实现StrStr
Implement strStr() 最新更新:https://yanjia.me/zh/2019/02/… Implement strStr(). Returns the index of the firs…
【leetcode】95. Unique Binary Search Trees II 含有N个节点的中序遍历有序的二叉树集
1. 题目 Given an integer n, generate all structurally unique BST’s (binary search trees) that store values…
[LeetCode] Russian Doll Envelopes 俄罗斯娃娃信封
You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope…
[LeetCode] Minimum Number of Arrows to Burst Balloons 最少数量的箭引爆气球
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided in…
[LeetCode] Maximum Average Subarray I 子数组的最大平均值
Given an array consisting of n integers, find the contiguous subarray of given length k&…
LeetCode | Palindrome Partitioning
题目: Given a string s, partition s such that every substring of the partition is a palindrome. R…