Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | PersonI…
分类:LeetCode题目解答
[Leetcode] Path Sum I & II & III 路径和1,2,3
最新更新请见:https://yanjia.me/zh/2019/01/… Path Sum I Given a binary tree and a sum, determine if the tree ha…
[Leetcode] Missing Number and Missing First Positive 找缺失数
Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that …
[LeetCode] Line Reflection 直线对称
Given n points on a 2D plane, find if there is such a line parallel to y-axis that reflect the given se…
LeetCode 172 Factorial Trailing Zeroes
题目描述 Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarith…
[Leetcode] Product of Array Except Self 自身以外的数组乘积
Product of Array Except Self Given an array of n integers where n > 1, nums, return an array output such th…
LintCode Binary Tree Maximum Node二叉树的最大节点
Find the maximum node in a binary tree, return the node. 样例 给出如下一棵二叉树: 1 / -5 2 / \ / 0 3 -4 -5 返回值为 3 的节点。 分析…
54. Spiral Matrix
54. Spiral Matrix 题目 Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix i…
[LeetCode] String to Integer (atoi) 字符串转为整数
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible …
[LeetCode] Additive Number 加法数
Additive number is a positive integer whose digits can form additive sequence. A valid additive sequenc…
[LeetCode] First Unique Character in a String 字符串第一个不同字符
Given a string, find the first non-repeating character in it and return it’s index. If it doesn…
322. Coin Change
You are given coins of different denominations and a total amount of money amount. Write a function to compute…