摘要: 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) 编辑
摘要: Well, this problem becomes a little trickier since there may be more than one majority element. But, there can be at most two of them. This can be pro... 阅读全文
posted @ 2015-06-30 11:54 jianchao-li 阅读(473) 评论(0) 推荐(0) 编辑
摘要: Well, if you have got this problem accepted, you may have noticed that there are 7 suggested solutions for this problem. The following passage will im... 阅读全文
posted @ 2015-06-30 11:32 jianchao-li 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 public: 3 /** 4 * @param dictionary: a vector of strings 5 * @return: a vector of strings 6 */ 7 vector l... 阅读全文
posted @ 2015-06-30 00:03 jianchao-li 阅读(403) 评论(0) 推荐(0) 编辑