Jorunnaparva
Jorunnaparva
全部文章
分类
题解(7)
归档
标签
去牛客网
登录
/
注册
Jorunnaparva的博客
全部文章
(共7篇)
Code pasted
#include <unordered_set> /* struct UndirectedGraphNode { int label; vector<struct UndirectedGraphNode *> neighbors; Undirected...
2020-10-07
0
526
Code pasted
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) {} };*/ class Palindrome { public: bool isPa...
2020-10-07
1
613
O(1) 额外空间
class Clearer { public: vector<vector<int> > clearZero(vector<vector<int> > mat, int n) { bool fr = any_of(mat[0]....
2020-10-07
0
733
Code pasted
class Transform { public: vector<vector<int> > transformImage(vector<vector<int> > mat, int n) { reverse(mat.begin...
2020-10-07
0
641
Code pasted
class Zipper { public: string zipString(string iniString) { char p = 0; int cnt = 0; string ret; int i = 0, n = i...
2020-10-07
0
683
Code pasted
class Replacement { public: string replaceSpace(string iniString, int length) { // count zeros int last = length + 2 * count(iniSt...
2020-10-07
1
798
Python EAFP 风格 C++ 异常处理
原题:猫狗收容所 有家动物收容所只收留猫和狗,但有特殊的收养规则,收养人有两种收养方式,第一种为直接收养所有动物中最早进入收容所的,第二种为选择收养的动物类型(猫或狗),并收养该种动物中最早进入收容所的。给定一个操作序列int[][2] ope(C++中为vector<vector<i...
2020-10-06
1
936