摘要: class Solution {public: ListNode *addTwoNumbers(ListNode *l1, ListNode *l2) { ListNode* p = l1; ListNode* q = l2; ListNode* re... 阅读全文
posted @ 2014-05-27 22:13 卖程序的小歪 阅读(197) 评论(0) 推荐(0) 编辑
摘要: const char* lookup[] = {" ", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxy... 阅读全文
posted @ 2014-05-27 20:43 卖程序的小歪 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe... 阅读全文
posted @ 2014-05-27 19:54 卖程序的小歪 阅读(221) 评论(0) 推荐(0) 编辑
摘要: class Solution { public: vector > permuteUnique(vector &num) { vector > result; if (num.size() path; dfs(n... 阅读全文
posted @ 2014-05-27 19:00 卖程序的小歪 阅读(166) 评论(0) 推荐(0) 编辑
摘要: class Solution { public: vector > generateMatrix(int n) { vector > matrix; if (n (n, 0)); }... 阅读全文
posted @ 2014-05-27 15:47 卖程序的小歪 阅读(168) 评论(0) 推荐(0) 编辑
摘要: class Solution { public: vector spiralOrder(vector > &matrix) { vector ret; int cols = 0; ... 阅读全文
posted @ 2014-05-27 14:42 卖程序的小歪 阅读(204) 评论(0) 推荐(0) 编辑