上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 46 下一页
摘要: 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 卖程序的小歪 阅读(166) 评论(0) 推荐(0) 编辑
摘要: class Solution { public: vector spiralOrder(vector > &matrix) { vector ret; int cols = 0; ... 阅读全文
posted @ 2014-05-27 14:42 卖程序的小歪 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 看到构造语意的其中一节“继承体系下的对象构造”(5.2节)的最后,看来原文,发现侯杰的翻译有问题,怪不得读起来不顺。What about when providing an argument for a base class constructor? Is it still physically s... 阅读全文
posted @ 2014-05-24 13:32 卖程序的小歪 阅读(204) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: int maxProfit(vector &prices) { int len = prices.size(); if (len maxv) { maxv = cur; ... 阅读全文
posted @ 2014-05-20 10:46 卖程序的小歪 阅读(173) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: bool isScramble(string s1, string s2) { int len = s1.length(); if (len == 1 && s1[0] == s2[0]) return true; ... 阅读全文
posted @ 2014-05-15 15:32 卖程序的小歪 阅读(166) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: bool search(int A[], int n, int target) { if (n A[mid]) { right = mid; sep = A[mid]; ... 阅读全文
posted @ 2014-05-15 00:24 卖程序的小歪 阅读(159) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: int canCompleteCircuit(vector &gas, vector &cost) { int len = gas.size(); if (len diff(len, 0); for (... 阅读全文
posted @ 2014-05-14 21:22 卖程序的小歪 阅读(250) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: ListNode *insertionSortList(ListNode *head) { if (head == NULL) return NULL; ListNode* sorted_head = head; ... 阅读全文
posted @ 2014-05-10 17:26 卖程序的小歪 阅读(178) 评论(0) 推荐(0) 编辑
摘要: >Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.class Solution {public: int m... 阅读全文
posted @ 2014-05-10 15:20 卖程序的小歪 阅读(208) 评论(0) 推荐(0) 编辑
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 46 下一页