随笔分类 - hihoCoder Solutions
Solutions to problems on http://hihocoder.com/problemset.
摘要:Each time we find a match, increase the global counter by 1.For KMP, algorithm, you may refer to the following links which have nice explanations.KMP ...
阅读全文
摘要:The hints of the problem has given detailed information to implement the topological sorting algorithm. In fact, the toposort algorithm of the hint is...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文