首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
Aether·Zhang
获赞
41
粉丝
1
关注
0
看过 TA
32
吉林大学
2020
Java
IP属地:陕西
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑Aether·Zhang吗?
发布(30)
刷题
Aether·Zhang
2022-04-14 14:55
已编辑
Java
Linux Commands
Linux Commands usual opt usual cmd # 常用命令 # 查看进程并筛选TCDriverService ps -ef | grep trdr # 远程拷贝 scp -r /tmp/tcpdump_0408.cap root@7.183.65.25:/tmp/ # 实时显示 process 的动态 top vim tcpdump # 南向结点抓包(上传、安装、抓包) scp tcpdump-4.9.3-4.eulerosv2r9.x86_64.rpm 129.39.89.9:/tmp ssh 129.39.89.9 su systemctl stop ...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-04-14 14:48
Java
LeetCode 剑指 Offer 32 - II. 从上到下打印二叉树 II
LeetCode 剑指 Offer 32 - II. 从上到下打印二叉树 II 解法一(队列): /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { private: queue<TreeNode*> q;...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-03-01 18:35
Java
HJ41.称砝码
HJ41.称砝码 解法一(回溯法,超过时间限制): #include <iostream> #include <vector> #include <unordered_set> using namespace std; unordered_set<int> rst; int sum(const vector<int>& vec) { int ret = 0; for (auto& i : vec) ret += i; return ret; } void backtrack(const ...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-03-01 02:17
Java
NC28.最小覆盖子串
NC28.最小覆盖子串 class Solution { public: string minWindow(string S, string T) { unordered_map<char, int> WinMap; unordered_map<char, int> TMap; for (auto& i : T) ++TMap[i]; int l = 0, r = -1; int cnt = 0; string minWin, win; w...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-28 19:50
已编辑
Java
NC17.最长回文子串
NC17.最长回文子串 class Solution { public: int getLongestPalindrome(string A) { int rst = 0; int len = (int)A.length(); for (int i = 0; i < len - rst; ++i) { for (int j = len - 1; j >= i; --j) { if (isPalindrome(A, i, j)) { ...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-28 19:20
Java
LeetCode 674. 最长连续递增序列
LeetCode 674. 最长连续递增序列 class Solution { public: int findLengthOfLCIS(vector<int>& nums) { int sz = (int)nums.size(); int rst = 0; int cnt = 0; for (int i = 0; i < sz; ++i) { if (i && nums[i] > nums[i - 1]) { ++cn...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-23 18:07
Java
LeetCode 面试题 08.08. 有重复字符串的排列组合
LeetCode 面试题 08.08. 有重复字符串的排列组合 解法一: class Solution { public: vector<string> permutation(const string& S) { int len = S.length(); set<string> strs; vector<vector<char>> perms = permute(vector<char>(S.begin(), S.end())); for (auto&...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-23 18:08
已编辑
Java
LeetCode 1614. 括号的最大嵌套深度
LeetCode 1614.括号的最大嵌套深度 class Solution { public: int maxDepth(const string& s) { int m = 0; std::stack<char> st; for (auto& i : s) { m = std::max((int)st.size(), m); if (i == ')' && !st.empty() && st.top() == '(') { ...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-21 23:44
Java
NC52.有效括号序列
NC52.有效括号序列 class Solution { public: /** * * @param s string字符串 * @return bool布尔型 */ bool isValid(const string& s) { // write code here const std::unordered_map<char, char> brackets { {')', '('}, {'}', '{'}, {']', '['} }; ...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-21 23:00
Java
HJ8.合并表记录
HJ8.合并表记录 #include <iostream> #include <map> int main() { int num = 0; int key = 0, val = 0; std::map<int, int> dict; std::cin >> num; for (int i = 0; i < num; ++i) { std::cin >> key >> val; dict[key] += val; } for (...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-21 22:31
Java
HJ106.字符逆序
HJ106 字符逆序 #include <iostream> #include <string> void swap(std::string& s, int i, int j) { int len = s.length(); if (i != j && (i >= 0 && i < len) && (j >= 0 && j < len)) { char tmp = '0'; tmp = s[i]; s[i] =...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-21 22:11
Java
HJ101.输入整型数组和排序标识,对其元素按照升序或降序进行排序
HJ101.输入整型数组和排序标识,对其元素按照升序或降序进行排序 #include <iostream> #include <vector> int part(std::vector<int>& vec, int l, int r, int order) { int d = vec[l]; while (l < r) { while (l < r && (order ? vec[r] <= d : vec[r] >= d)) { --r; ...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-21 21:04
Java
HJ33.整数与IP地址间的转换
HJ33.整数与IP地址间的转换 #include <iostream> #include <string> #include <sstream> #include <regex> #include <string.h> const int BYTE = 8; unsigned int str2uint(const std::string& s) { unsigned int ret = 0; std::stringstream ss; ss << s; ss >> ...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-20 23:54
已编辑
Java
HJ23.删除字符串中出现次数最少的字符
HJ23.删除字符串中出现次数最少的字符 #include <iostream> #include <string> #include <unordered_map> const int INF = 0x3f3f3f3f; void deal(std::string& s) { std::unordered_map<char, int> dict; for (auto& i : s) { ++dict[i]; } int min = INF; for (auto&...
0
点赞
评论
收藏
转发
Aether·Zhang
2022-02-20 23:19
已编辑
Java
HJ20.密码验证合格程序
HJ20.密码验证合格程序 #include <iostream> #include <string> #include <unordered_set> const std::string OK = "OK"; const std::string NG = "NG"; bool check1(const std::string& s) { return s.length() > 8; } bool check2(const std::string& s) { int type[4] = {0, 0, 0, 0}; ...
0
点赞
评论
收藏
转发
1
2
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务