摘要:
Well, there many ways to solve this problem. Let's first look at a naive solution.The basic idea is simple. Starting from the first character of the s... 阅读全文
posted @ 2015-06-07 21:14
jianchao-li
阅读(214)
评论(0)
推荐(0)
摘要:
The key of this problem is that we need not build the tree from scratch. In fact, we can direct obtain its post-order traversal results in a recursive... 阅读全文
posted @ 2015-06-07 16:51
jianchao-li
阅读(194)
评论(0)
推荐(0)
摘要:
This is a application of the Trie data structure, with minor extension. The critical part in this problem is to count all the words that have a partic... 阅读全文
posted @ 2015-06-07 16:44
jianchao-li
阅读(242)
评论(0)
推荐(0)
摘要:
A direct applicatin of the heap data structure. Specifically, a max heap is used. The required functions include insertion of a node to the heap and e... 阅读全文
posted @ 2015-06-07 16:39
jianchao-li
阅读(201)
评论(0)
推荐(0)
摘要:
The idea is to usetwo stacks.Forpush, the first stack records the pushed elements and the second stack recordsallthe minimum (including duplicates) th... 阅读全文
posted @ 2015-06-07 01:40
jianchao-li
阅读(200)
评论(0)
推荐(0)
摘要:
This problem is an application of the Trie data structure. In the following, it is assumed that you have solvedImplement Trie (Prefix Tree).Now, let's... 阅读全文
posted @ 2015-06-07 01:13
jianchao-li
阅读(418)
评论(0)
推荐(0)

浙公网安备 33010602011771号