题目地址:https://leetcode-cn.com/probl…题目描述:给定一个二叉树和一个目标和,找到所有从根节点到叶子节点路径总和等于给定目标和的路径。 说明: 叶子节点是指没有子节点的节点。 示…
标签:LeetCode题目解答
High Five解题报告
Description: There are two properties in the node student id and scores, to ensure that each student will have…
[Leetcode] Shortest Word Distance 最短单词间距
Shortest Word Distance Given a list of words and two words word1 and word2, return the shortest distance betwe…
[Leetcode] Permutations 全排列
Permutations I Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the …
【leetcode】45. Jump Game II 非负数组的最少跳跃步数
1. 题目 Given an array of non-negative integers, you are initially positioned at the first index of the array. E…
84. Largest Rectangle in Histogram-hard
84. Largest Rectangle in Histogram 题目 Given n non-negative integers representing the histogram's bar height wh…
11. Container With Most Water
欢迎fork and star:Nowcoder-Repository-github 11. Container With Most Water 题目 Given n non-negative integers a1, …
[LeetCode] Quad Tree Intersection 四叉树相交
A quadtree is a tree data in which each internal node has exactly four children: topLeft, top…
LeetCode 121 Best Time to Buy and Sell Stock
题目描述 Say you have an array for which the ith element is the price of a given stock on day i. If you were only …
[Leetcode] Cheapest Flights Within K Stops 计算最便宜票价
Cheapest Flights Within K Stops There are n cities connected by m flights. Each fight starts from city u and a…
【leetcode】59. Spiral Matrix II 方阵向内循环
1. 题目 Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For exam…
[LeetCode] Burst Balloons 打气球游戏
Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number…