摘要:
注意The loop must be "forward" or "backward'. 所以这就是为什么[-2, 1, -1, -2, -2]是false的原因 Just think it as finding a loop in Linkedlist, except that loops with 阅读全文
posted @ 2016-12-20 11:39
neverlandly
阅读(1541)
评论(0)
推荐(0)
摘要:
Topological Sort: This problem is to determine if there's one, and only one sequence to sort a DAG. The method is to check if the queue's size is alwa 阅读全文
posted @ 2016-12-20 07:15
neverlandly
阅读(973)
评论(0)
推荐(0)
摘要:
My First Solution: Use Stack and String operation, from the back of the string, find the first '?', push the right to stack. Depends on whether the ch 阅读全文
posted @ 2016-12-20 05:11
neverlandly
阅读(843)
评论(0)
推荐(0)
摘要:
Backtracking + Trie: referred to https://discuss.leetcode.com/topic/63516/explained-my-java-solution-using-trie-126ms-16-16 A better approach is to ch 阅读全文
posted @ 2016-12-20 01:38
neverlandly
阅读(686)
评论(0)
推荐(0)
浙公网安备 33010602011771号