无奋斗不青春!
无奋斗不青春!
全部文章
分类
C语言(59)
Java(19)
Java面试专栏(5)
SSM项目(5)
剑指Offer(55)
单调栈(5)
开发软件安装(1)
数据结构(24)
未归档(2)
秒杀项目实践(2)
经验贴(3)
面试题(1)
题解(3)
归档
标签
去牛客网
登录
/
注册
无奋斗不青春!的博客
全部文章
(共184篇)
题解 | #最长无重复子数组#
解题思路: 使用滑动窗口去做 滑动窗口的右边界是添加元素,左边界是删除元素 当新的元素来的时候,判断当前窗口内是否有这个元素值。 如果没有,那么直接从右边界添加此元素,记录当前窗口的大小。 如果有,那么左边界...
Java
滑动窗口
2021-12-09
0
0
数组:编写一个函数delet(char s[],char c)。函数功能:删除字符数组s中出现的与变量c相同的字符。
#include<stdio.h> #include<string.h> void delet(char s[],char c) { int i=0,j=0; char a[10]; while(s[i]!='\0') { if(s[i]!=c) ...
2021-12-09
0
0
数组:输入n(n>=2)个整数,找出从小到大的第i个数。
#include<stdio.h> int main() { int n,i,j,temp,m; int a[10]; printf("输入n个整数,输出第i小的数\n"); scanf("%d %d",&n,&m)...
2021-12-09
0
0
链表:前插法建立单链表。
#include <stdio.h> #include <stdlib.h> #define N 5 typedef struct list { int data; struct list *next; }LNode; LNode *creatli...
2021-12-09
0
0
链表:利用单链表输入一个字符串,逆序输出。
#include<stdio.h> #include<stdlib.h> struct node{ char data; struct node *link; }*head; int main() { char ch; struct node *p; ...
2021-12-09
0
0
链表:编写函数void reverse(LNode *h)。函数功能:利用原来的存储空间将链表逆置输出。
#include <stdio.h> #include <stdlib.h> #define N 5 typedef struct list { int data; struct list *next; }LNode; void reverse(L...
2021-12-09
0
0
链表:编写一个函数void fun(LNode *A,LNode *B,LNode *&C)。函数功能:将两个递增有序的链表合并为一个递增有序的链表。
#include <stdio.h> #include <stdlib.h> #define N 5 typedef struct list { int data; struct list *next; }LNode; LNode *creatli...
2021-12-09
0
0
链表:编写一个函数int max(LNode *h)。函数功能:返回链表中的最大值。
#include <stdio.h> #include <stdlib.h> #define N 5 typedef struct list { int data; struct list *next; }LNode; LNode *creatli...
2021-12-09
0
0
链表:编写一个函数int count(LNode *h)。函数功能:统计单链表中结点的个数。
#include <stdio.h> #include <stdlib.h> #define N 5 typedef struct list { int data; struct list *next; }LNode; LNode *creatli...
2021-12-09
0
0
链表:编写一个函数int fun(LNode *h,int x)。函数功能:统计链表中数值为x的结点的个数。
#include <stdio.h> #include <stdlib.h> #define N 5 typedef struct list { int data; struct list *next; }LNode; LNode *creatli...
2021-12-09
0
0
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页