评分 0, 满分 5 星
0 票

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

评分 0, 满分 5 星
0 票

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...

Comments Off on [LeetCode]Multiply Strings

评分 0, 满分 5 星
0 票

For a random index m, compare nums[m] 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.

评分 0, 满分 5 星
0 票

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

Comments Off on [LeetCode]Add Digits

评分 0, 满分 5 星
0 票

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.

Comments Off on [LeetCode]Search a 2D Matrix II

评分 5.00, 满分 5 星
1 票

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.

评分 0, 满分 5 星
0 票

For an n-element array, if we could get \prod_{i = 0}^{k - 1} and \prod_{i = k + 1}^{n - 1}, we get res[k]. And here are exactly two arrays 🙂

Comments Off on [LeetCode]Product of Array Except Self

评分 0, 满分 5 星
0 票

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

#
Comments Off on [LeetCode]Count Complete Tree Nodes