摘要:
```C++ class Solution { public: vector matrixReshape(vector & nums, int r, int c) { if(nums.empty() || nums[0].empty()){ return {}; } auto h = nums.si 阅读全文
摘要:
```C++ class Solution { public: vector generate(int numRows) { vector res; if(numRows curr_row; int r=1; while(r 阅读全文
摘要:
```C++ class Solution { public: vector transpose(vector & A) { vector res; if(A.empty() || A[0].empty()){ return res; } int h = A.size(); int w = A[0] 阅读全文
摘要:
```python3 class Solution: def rob(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 0 if len(nums) == 1: ... 阅读全文
摘要:
```C++
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; ... 阅读全文