c7rious
c7rious
全部文章
题解
归档
标签
去牛客网
登录
/
注册
c7rious的博客
全部文章
/ 题解
(共21篇)
机器人的运动范围,c++
class Solution { public: int movingCount(int threshold, int rows, int cols) { if (threshold < 1) return 0; set&...
剑指offer
c++
机器人的运动范围
题解
2019-12-30
0
728
剪绳子,c++
class Solution { public: int cutRope(int number) { int res = 0; // 此处循环中的i是段的长度,等于1时指全是长度为1的段,不能等于number for (int i = 1; i...
剑指offer
c++
剪绳子
题解
2019-12-30
0
902
矩阵中的路径,c++
class Solution { public: bool hasPath(char* matrix, int rows, int cols, char* str) { if (*matrix == '\0' || *str == '\0') ...
剑指offer
c++
题解
矩阵中的路径
2019-12-26
0
741
左旋转字符串,c++
class Solution { public: string LeftRotateString(string str, int n) { if(str.empty()) return str; n = n % str.size(); ...
剑指offer
c++
题解
左旋转字符串
2019-12-20
0
629
平衡二叉树,c++
class Solution { public: bool IsBalanced_Solution(TreeNode* pRoot) { auto res = find_deep(pRoot); if (res == -1) retu...
剑指offer
c++
平衡二叉树
题解
2019-12-11
0
850
字符串的排列,c++
class Solution { public: vector<string> Permutation(string str) { vector<string> res; if (str.empty()) ret...
剑指offer
c++
题解
字符串的排列
2019-11-28
0
884
二叉搜索树与双向链表,c++
class Solution { public: TreeNode* Convert(TreeNode* pRootOfTree) { if (pRootOfTree == nullptr) return pRootOfTree; ...
剑指offer
c++
二叉搜索树与双向链表
题解
2019-11-28
9
1386
复杂链表的***,c++
class Solution { public: RandomListNode* Clone(RandomListNode* pHead) { if (pHead == nullptr) return pHead; // map...
剑指offer
c++
题解
2019-11-27
12
1145
二叉搜索树的后序遍历序列,c++
class Solution { public: bool VerifySquenceOfBST(vector<int> sequence) { if (sequence.empty()) return false; re...
剑指offer
c++
二叉搜索树的后序遍历序列
题解
2019-11-21
0
684
栈的压入、弹出序列,c++
class Solution { public: bool IsPopOrder(vector<int> pushV,vector<int> popV) { stack<int> assist; auto pin1 = pu...
栈的压入弹出序列
剑指offer
c++
题解
2019-11-21
0
738
首页
上一页
1
2
3
下一页
末页