# 分类：LeetCode题目解答汇总

## LeetCode | Sum Root to Leaf Numbers（所有根结点到叶节点路径和的和）

Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number…

## LeetCode | Substring with Concatenation of All Words（链接所有单词的子串）

You are given a string, S, and a list of words, L, that are all of the same length. Find all startin…

## LeetCode | Remove Element（删除指定元素）

Given an array and a value, remove all instances of that value in place and return the new length. The order o…

## LeetCode | Unique Binary Search Trees（二叉搜索树的个数）

Given n, how many structurally unique BST’s (binary search trees) that store values 1R…

## LeetCode | Reverse Words in a String（字符串中的单词序反转）

Given an input string, reverse the string word by word. For example, Given s = “the sky is blue“, …

## LeetCode | Linked List Cycle（判断链表是否有环）

Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space?…

## LeetCode | Path Sum（路径和）

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the value…

## LeetCode | Search in Rotated Sorted Array（在旋转数组中查找）

Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 migh…

## LeetCode | Spiral Matrix（顺时针打印矩阵）

Given a matrix of m x n elements (m rows, n columns), return all elements o…

## LeetCode | 3Sum Closest（找到三个数使其和与target最接近）

Given an array S of n integers, find three integers in S such that the sum is cl…

## LeetCode | Combination Sum（元素的和）

Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C wher…