去听了Ming-Ting Sun老师的一个讲座，大概内容是如何通过RGB-D Image进行物体的3D重建，忽然就想起了两年前的那道题...

# [LeetCode]Multiply Strings

Classical problem, try to finish it within 10 mins... // Coding 10 mins, debugging 5mins!!! It took me nearly 15 mins to solve it, time is so cruel...

# [LeetCode]Find Peak Element

For a random index , compare with its neighbor, one of the answer belongs to the interval that the bigger element belongs to too, and we can optimize our program based on this.

# [LeetCode]Add Digits

Notice the result( number) of the numbers is a periodic sequence...

# [LeetCode]Binary Tree Paths

Depth-First-Search..

# [LeetCode]Search a 2D Matrix II

Here is a direct solution: keep narrowing the scope of matrix, and at the end, either the target doesn't belong to the matrix or the target appears in the scope's right-up corner as well as left-down corner.

# [LeetCode]Valid Anagram

Count numbers...

# [LeetCode]Sliding Window Maximum

The data structure we selected in this problem should satisfy at least two conditions: 1) monotonicity, which guarantees in every sliding window we could always get the max element; 2) FIFO, which ensures the problem could be solved in linear time.

# [LeetCode]Product of Array Except Self

For an array, if we could get and , we get . And here are exactly two arrays 🙂

# [LeetCode]Count Complete Tree Nodes

Suppose there is a tree , now starting from root node, if the distance to left-most child node equals to the distance to the right-most child node, we can calculate the total number of tree nodes of directly. Since we don't have to scan every node of the tree, the time complexity of algorithm is .