随笔分类 -  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 ... 阅读全文
posted @ 2015-06-30 17:55 jianchao-li 阅读(234) 评论(0) 推荐(0) 编辑
摘要:The hints of the problem has given detailed information to implement the topological sorting algorithm. In fact, the toposort algorithm of the hint is... 阅读全文
posted @ 2015-06-28 23:44 jianchao-li 阅读(203) 评论(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 阅读(187) 评论(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 阅读(233) 评论(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 阅读(195) 评论(0) 推荐(0) 编辑