摘要:
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 ... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
1 class Solution { 2 public: 3 /** 4 * @param dictionary: a vector of strings 5 * @return: a vector of strings 6 */ 7 vector l... 阅读全文