1957

无聊蛋疼的1957写的低端博客
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年10月31日

摘要: class Solution {public: vector spiralOrder(vector > &matrix) { // IMPORTANT: Please reset any member data you declared, as // the same Solution instance will be reused for each test case. vector ans; int m = matrix.size(); if(m == 0) return ans; int n = m... 阅读全文

posted @ 2013-10-31 16:38 1957 阅读(177) 评论(0) 推荐(0) 编辑

摘要: /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Solution {public: bool compare(TreeNode* l , TreeNode* r){ if(l == NULL && r == NULL) return true; ... 阅读全文

posted @ 2013-10-31 13:56 1957 阅读(150) 评论(0) 推荐(0) 编辑

摘要: class Solution {public: vector > generate(int numRows) { // IMPORTANT: Please reset any member data you declared, as // the same Solution instance will be reused for each test case. vector > ans; if(numRows == 0) return ans; vector tmp ; tmp.push_back(1); ... 阅读全文

posted @ 2013-10-31 10:56 1957 阅读(133) 评论(0) 推荐(0) 编辑

摘要: class Solution {public: string getChar(char ch){; switch(ch){ case '2' : return "abc"; case '3' : return "def"; case '4' : return "ghi"; case '5' : return "jkl"; case '6' : return "mno"; case '7' : retu 阅读全文

posted @ 2013-10-31 10:43 1957 阅读(176) 评论(0) 推荐(0) 编辑