Alan Zhan 部落格

Live for nothing, or die for something

白話解 Leetcode - 70 Climbing Stairs

70. Climbing Stairs https://leetcode.com/problems/climbing-stairs/ EasyYou are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many …

白話解 Leetcode - 69 Sqrt(x)

69. Sqrt(x) https://leetcode.com/problems/sqrtx/ EasyGiven a non-negative integer x, compute and return the square root of x. Since the return type is an integer, the decimal digits are …

白話解 Leetcode - 111 Minimum Depth of Binary Tree

111. Minimum Depth of Binary Tree https://leetcode.com/problems/minimum-depth-of-binary-tree/ EasyGiven a binary tree, find its minimum depth. The minimum depth is the number of nodes along the …

白話解 Leetcode - 104 Maximum Depth of Binary Tree

104. Maximum Depth of Binary Tree https://leetcode.com/problems/maximum-depth-of-binary-tree/ EasyGiven the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the …

白話解 Leetcode - 226 Invert Binary Tree

226. Invert Binary Tree https://leetcode.com/problems/invert-binary-tree/ EasyGiven the root of a binary tree, invert the tree, and return its root.   Example 1: Input: root = [4,2,7,1,3,6,9] …