摘要:
As the note in the problem statement, this problem has a straight-forward O(n)-space solution, which is to generate the inorder traversal results of t... 阅读全文
posted @ 2015-07-15 23:27
jianchao-li
阅读(215)
评论(0)
推荐(0)
摘要:
This problem has a nice BFS structure. Let's illustrate it using the examplenums = [2, 3, 1, 1, 4]in the problem statement. We are initially at positi... 阅读全文
posted @ 2015-07-15 21:30
jianchao-li
阅读(232)
评论(0)
推荐(0)
摘要:
This problem has a very concise solution in this link, just 4-lines. The code is rewritten below.1 class Solution {2 public:3 bool canJump(vector&... 阅读全文
posted @ 2015-07-15 20:20
jianchao-li
阅读(217)
评论(0)
推荐(0)
摘要:
Well, this problem is just a trick. In fact, we cannot really delete the given node, but just delete its next node after copying the data of the next ... 阅读全文
posted @ 2015-07-15 13:44
jianchao-li
阅读(272)
评论(0)
推荐(0)
摘要:
Note: If you feel unwilling to read the long codes, just take the idea with you. The codes are unnecessarily long due to the inconvenient handle of ma... 阅读全文
posted @ 2015-07-15 00:42
jianchao-li
阅读(264)
评论(0)
推荐(0)

浙公网安备 33010602011771号