bob62856
码龄8年
  • 735,782
    被访问
  • 429
    原创
  • 1,795
    排名
  • 479
    粉丝
关注
提问 私信
  • 加入CSDN时间: 2014-09-15
博客简介:

bob的博客

查看详细资料
  • 6
    领奖
    总分 2,506 当月 45
个人成就
  • 获得316次点赞
  • 内容获得87次评论
  • 获得2,227次收藏
创作历程
  • 61篇
    2022年
  • 157篇
    2021年
  • 522篇
    2020年
  • 19篇
    2019年
  • 17篇
    2018年
  • 36篇
    2017年
成就勋章
TA的专栏
  • Algorithm
    327篇
  • Linux
    191篇
  • Kubernetes
    14篇
  • Docker
    15篇
  • DPDK
    31篇
  • 最近
  • 文章
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

leetcode算法题--删点成林+

原题链接:https://leetcode.cn/problems/delete-nodes-and-return-forest/这题有点难度,对于任意节点,需要将该节点的状态传递给子节点(parentExist),并且返回给父节点 (return del)class Solution {public: vector<TreeNode*> res; set<int> st; vector<TreeNode*> delNodes(TreeNo
原创
发布博客 2022.05.22 ·
20 阅读 ·
0 点赞 ·
0 评论

leetcode算法题--将杂乱无章的数字排序

原题链接:https://leetcode.cn/problems/sort-the-jumbled-numbers/vector<int> mp;int getMap(int a) { int x = 0, m = 1; do { int t = a%10; a /= 10; x += mp[t]*m; m *= 10; } while(a); return x;}bool cmp(int
原创
发布博客 2022.05.22 ·
8 阅读 ·
0 点赞 ·
0 评论

leetcode算法题--有重复字符串的排列组合

原题链接:https://leetcode.cn/problems/permutation-ii-lcci/dfs + 回溯class Solution {public: set<string> st; vector<int> visited; string s; int n; vector<string> permutation(string S) { s = S; n = S.size();
原创
发布博客 2022.05.22 ·
25 阅读 ·
0 点赞 ·
0 评论

leetcode算法题--总持续时间可被 60 整除的歌曲

原题链接:https://leetcode.cn/problems/pairs-of-songs-with-total-durations-divisible-by-60/通过余数来求解,并且余数为0和为30的要单独讨论class Solution {public: int numPairsDivisibleBy60(vector<int>& time) { map<int, vector<int>> vec; for
原创
发布博客 2022.05.22 ·
10 阅读 ·
0 点赞 ·
0 评论

leetcode算法题--从中序与后序遍历序列构造二叉树+

使用递归来做class Solution {public: vector<int> in_order, post_order; unordered_map<int, int> in_mp; int idx; TreeNode* buildTree(vector<int>& inorder, vector<int>& postorder) { in_order = inorder;
原创
发布博客 2022.05.21 ·
109 阅读 ·
0 点赞 ·
0 评论

Git 撤销commit中单个文件的修改

转载
发布博客 2022.05.17 ·
17 阅读 ·
0 点赞 ·
0 评论

Git删除空目录

git clean -fd
原创
发布博客 2022.05.17 ·
25 阅读 ·
0 点赞 ·
0 评论

leetcode算法题--根据描述创建二叉树

原题链接:https://leetcode.cn/problems/create-binary-tree-from-descriptions/class Solution {public: TreeNode* createBinaryTree(vector<vector<int>>& descriptions) { unordered_map<int, TreeNode*> mp; unordered_map<in
原创
发布博客 2022.05.15 ·
138 阅读 ·
0 点赞 ·
0 评论

leetcode算法题--T9键盘

原题链接:https://leetcode.cn/problems/t9-lcci/class Solution {public: vector<string> getValidT9Words(string num, vector<string>& words) { vector<char> vec= {'2', '2', '2', '3', '3', '3', '4', '4', '4', '5', '5', '5', '6', '6
原创
发布博客 2022.05.15 ·
47 阅读 ·
0 点赞 ·
0 评论

leetcode算法题--字符串解码

使用递归做的,当然也可以用栈做class Solution {public: string decodeString(string s) { int i = 0; return dfs(s, i); } string dfs(string s, int& i) { int n = s.size(); string res = ""; while (i < n) {
原创
发布博客 2022.05.15 ·
51 阅读 ·
0 点赞 ·
0 评论

work节点使用kubectl

在work节点mkdir .kube将master节点的文件拷贝过来scp master:/root/.kube/config .kube/原文链接:https://blog.csdn.net/u014089832/article/details/108429566
转载
发布博客 2022.04.30 ·
13 阅读 ·
0 点赞 ·
0 评论

leetcode算法题--最常见的单词

原题链接:https://leetcode-cn.com/problems/most-common-word/class Solution {public: string mostCommonWord(string paragraph, vector<string>& banned) { unordered_map<string, int> mp, ban; for (auto b : banned) { b
原创
发布博客 2022.04.18 ·
132 阅读 ·
0 点赞 ·
0 评论

leetcode算法题--两个列表的最小索引总和

原题链接: https://leetcode-cn.com/problems/minimum-index-sum-of-two-lists/class Solution {public: vector<string> findRestaurant(vector<string>& list1, vector<string>& list2) { map<string, int> mp1; map<i
原创
发布博客 2022.04.17 ·
12 阅读 ·
0 点赞 ·
0 评论

linux kernel 网络子系统

原创
发布博客 2022.04.13 ·
290 阅读 ·
0 点赞 ·
0 评论

shell if command判断

if [ command ]; then 语句1fi如果command返回0,这if判断成功,执行语句1,否则跳出
原创
发布博客 2022.04.12 ·
217 阅读 ·
0 点赞 ·
0 评论

tig只看某个作者的提交

git log --author="Roman Inflianskas" | tig
原创
发布博客 2022.04.12 ·
208 阅读 ·
0 点赞 ·
0 评论

Docker images 更新问题

如果是完全相同的两个image,则如执行docker build;docker load不会更新,仍使用之前的image如果是不同的两个image,但是image的repositiory:tag是相同的,则会把旧镜像置为none:none,若之后再用到该旧镜像,则直接改repositiory:tag名,并不做更新。...
原创
发布博客 2022.04.11 ·
600 阅读 ·
0 点赞 ·
0 评论

tmux配置文件

tmux配置文件vim ~/.tmux.conf使配置文件生效tmux source-file ~/.tmux.conf
原创
发布博客 2022.04.08 ·
111 阅读 ·
0 点赞 ·
0 评论

给普通用户赋予docker权限

1、 查看当前用户组中是否有docker组sudo cat /etc/group | grep docker2、 如果没有则创建sudo groupadd docker3、sudo usermod -aG docker $USERsudo usermod -aG dockerroot $USER4、 退出用户重连即可
原创
发布博客 2022.03.15 ·
2207 阅读 ·
0 点赞 ·
0 评论

git删除远程已经没有的分支

1.查看远程分支和本地分支的对应关系:git remote show origin 2.删除远程已经删除过的分支:git remote prune origin
原创
发布博客 2022.03.14 ·
475 阅读 ·
0 点赞 ·
0 评论
加载更多