会越来越强的哒哒
会越来越强的哒哒
全部文章
分类
题解(24)
归档
标签
去牛客网
登录
/
注册
会越来越强的哒哒的博客
全部文章
(共24篇)
题解 | #链表的回文结构#
空间复杂度O(n)时间复杂度O(n)fast走两步slow走一步,fast走完的时候slow到中间点把中间点之后的链表翻转fast回到头,和slow一起走(每次走一步)如果回文,从头走的和从中间走的每个val值都相同 import java.util.*; /* public class List...
双指针
链表
Java
2022-08-06
0
329
题解 | #字符集合#
public class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); while(scanner.hasNextLine()) ...
Java
2022-05-10
1
459
题解 | #判断质数#
public class Main { public static void main(String[] args) { Main main = new Main(); Scanner scan = new Scanner(System.in); ...
Java
2022-04-22
0
306
题解 | #图片整理#
太简单了我就写了个动态分配内存版本的 #include<stdio.h> #include<string.h> #include<stdlib.h> #define MAX 10 struct Word { char* strarr; int sz...
C
2022-04-07
0
344
题解 | #字符串排序#
">#include<ctype.h> #include<stdlib.h> #include<string.h> #include<assert.h> int my_strcmp(const void* elem1,const void* elem2...
C
2022-04-06
0
443
题解 | #坐标移动#
怎么有我这种把代码写的这么罗嗦的人... #include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> void** my_malloc(int row, int co...
C
2022-04-04
0
400
题解 | #合并表记录#
">#include<stdlib.h> int cmp(void* elem1,void* elem2) { return *(int*)elem1 - *(int*)elem2; } int main() { int n = 0; scanf("%d",&am...
C
2022-03-23
1
394
题解 | #矩阵相等判定#
">int main() { int n = 0,m = 0; scanf("%d %d",&n,&m); int arr1[n][m]; int arr2[n][m]; int i = 0; int j = 0; int fl...
C
2022-03-10
0
330
题解 | #牛牛的西格玛#
">int main() { int n = 0; scanf("%d ",&n); int sum = 0; int i = 0; for(i = 0;i<=n;i++) { sum+=i; } prin...
C
2022-03-10
1
324
题解 | #正方形图案#
">int main() { int n = 0; while(scanf("%d",&n)!=EOF) { int i = 0; int j = 0; for(i = 0;i < n;i++) {...
C
2022-03-09
0
371
首页
上一页
1
2
3
下一页
末页