摘要: class Solution {private: int* memo;public: bool wordBreak(string s, unordered_set &dict) { memo = new int[s.length() + 1]; for (in... 阅读全文
posted @ 2014-05-06 16:12 卖程序的小歪 阅读(126) 评论(0) 推荐(0) 编辑
摘要: int sunday(string str, string pattern) { int str_len = str.length(); int pat_len = pattern.length(); int char_pos[256]; for (int i = 0... 阅读全文
posted @ 2014-05-06 15:27 卖程序的小歪 阅读(190) 评论(0) 推荐(0) 编辑
摘要: ```cppclass Solution {public: void connect(TreeLinkNode *root) { if (root == NULL) return; queue que; que.push(root); i... 阅读全文
posted @ 2014-05-06 09:51 卖程序的小歪 阅读(150) 评论(0) 推荐(0) 编辑