题目链接 解题思路:双指针 C++: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} ...
分类:
其他好文 时间:
2021-04-06 14:05:05
阅读次数:
0
31. 下一个排列 LeetCode_31 题目描述 题解分析 代码实现 class Solution { public void nextPermutation(int[] nums) { int i = nums.length - 2; while(i >= 0 && nums[i] >= nu ...
分类:
其他好文 时间:
2021-04-06 14:03:32
阅读次数:
0
string s; while(getline(cin,s)){ cout<<s<<endl; } ...
分类:
编程语言 时间:
2021-04-06 14:01:34
阅读次数:
0
Linux下su与su -命令的本质区别 su命令和su -命令最大的本质区别就是: 前者只是切换了root身份,但Shell环境仍然是普通用户的Shell; 而后者连用户和Shell环境一起切换成root身份了。只有切换了Shell环境才不会出现PATH环境变量错误。su切换成root用户以后,p ...
分类:
系统相关 时间:
2021-04-06 14:01:20
阅读次数:
0
归并排序模板 code: #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int N = 1e5 + 10; typedef long long ...
分类:
编程语言 时间:
2021-04-05 12:52:30
阅读次数:
0
1 安装 sudo apt-get install zsh 2 修改默认shell chsh -s /bin/zsh 3 配置passwd sudo vim /etc/passwd root:x:0:0:root:/root:/bin/bash改成root:x:0:0:root:/root:/bin ...
分类:
系统相关 时间:
2021-04-05 12:42:45
阅读次数:
0
#include<bits/stdc++.h> using namespace std; int main(){ char s[105]; int x,y; while(scanf("%d %d",&x,&y)!=EOF){ scanf("%s",s); int ans=0; int len=str ...
分类:
其他好文 时间:
2021-04-05 12:35:26
阅读次数:
0
hdfs会为每一个用户创建一个回收站目录:/usr用户名/.Trash/,每一个用户在Shell命令行删除的文件/目录,会进入到对应的回收站目录中,在回收站中的数据都有一个生命周期,也就是说当回收站中的文件/目录在一段时间之内没有被用户恢复的话,HDFS就会自动将这个文件/目录彻底删除。 默认情况下 ...
分类:
其他好文 时间:
2021-04-05 12:30:22
阅读次数:
0
基础习题 习题1 请用代码验证'name'是否在字典的键中 info = {'name': '王刚蛋', 'hobby': '铁锤', 'age': '18'} info = {'name': '王刚蛋', 'hobby': '铁锤', 'age': '18'} if info.get('name' ...
分类:
编程语言 时间:
2021-04-05 12:13:50
阅读次数:
0
windows开发gin项目,最后生成linux 可以直接运行的文件 1.vs code 终端运行: PS L:\ginProject>set GOARCH=amd64PS L:\ginProject> set GOOS=linuxPS L:\ginProject> go build -o test ...
分类:
系统相关 时间:
2021-04-05 12:11:44
阅读次数:
0