题目描述 Follow up for “Unique Paths”: Now consider if some obstacles are added to the grids. How many unique path…
分类:LeetCode题目解答
【leetcode】40. Combination Sum II 有重复值的整数数组等于指定值的所有子集组合
1. 题目 Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C w…
力扣(LeetCode)130
题目地址:https://leetcode-cn.com/probl…题目描述:给定一个二维的矩阵,包含 ‘X’ 和 ‘O’(字母 O)。 找到所有被 R…
[LeetCode] Two Sum 两数之和
Given an array of integers, return indices of the two numbers such that they add up to a spec…
[LeetCode] Recover Binary Search Tree 复原二叉搜索树,Binary Tree Inorder Traversal
Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing it…
[LeetCode] Student Attendance Record II 学生出勤记录之二
Given a positive integer n, return the number of all possible attendance records with length n, which w…
[Javascript] 实现setInterval函数
问题 经常使用Javascript的同学一定对setInterval非常熟悉,当使用setInterval(callback, timer)时,每经过timer毫秒时间,系统都将调用一次callback。请问全局如果没有…
数组分为两部分,使得其和相差最小,将1~n个整数按字典顺序进行排序,返回排序后第m个元素
题目:将一个数组分成两部分,不要求两部分所包含的元素个数相等,要求使得这两个部分的和的差值最小。比如对于数组{1,0,1,7,2,4},可以分成{1,0,1,2,4}和{7},使得这两部分的差值最小。 思路:这个问题可以…
98. Validate Binary Search Tree
98. Validate Binary Search Tree 题目 Given a binary tree, determine if it is a valid binary search tree (BST). A…
[LeetCode] Customers Who Never Order 从未下单订购的顾客
Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL query…
[LeetCode] Find Bottom Left Tree Value 寻找最左下树结点的值
Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Input: 2 / \ 1 3 O…
[LeetCode] Longest Uncommon Subsequence II 最长非共同子序列之二
Given a list of strings, you need to find the longest uncommon subsequence among them. The longest unco…