摘要: class Solution {private: vector > res;public: vector > combine(int n, int k) { res.clear(); vector path; dfs(1, n, k, path)... 阅读全文
posted @ 2014-06-28 22:02 卖程序的小歪 阅读(108) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: int minPathSum(vector > &grid) { int rows = grid.size(); if (rows pathsum(cols + 1, INT_MAX); pathsum... 阅读全文
posted @ 2014-06-28 21:47 卖程序的小歪 阅读(143) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: bool isPalindrome(string s) { int len = s.length(); //if (len -1 && !(b = check2lower(s[q])) ); i... 阅读全文
posted @ 2014-06-28 21:00 卖程序的小歪 阅读(175) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: int longestConsecutive(vector &num) { int len = num.size(); int max_cons = 0; int cur_cons = 0... 阅读全文
posted @ 2014-06-28 20:16 卖程序的小歪 阅读(161) 评论(0) 推荐(0) 编辑