- 博客(7)
- 收藏
- 关注
原创 SWUST OJ 961: 进制转换问题
#include<stdio.h>#include<malloc.h>#include<stdbool.h>#define MaxSize 1000typedef struct{ int data[MaxSize]; int top;}SqStack;void Push(SqStack* s,int n)//进栈{ s->top++; s->data[s->top]=n;}void TransForm.
2022-04-28 10:21:58
265
原创 SWUST OJ 960: 双向链表的操作问题
#include <stdio.h>#include <stdlib.h>#include <stdbool.h>typedef struct node{ int date; struct node *next; struct node *prior;}List;void InitList(List *head,int n){ List* p=head,*q; int i; for(i=0;i<n;i+.
2022-04-27 18:14:14
789
原创 SWUST OJ 957: 逆置单链表
#include <stdio.h>#include <stdlib.h>typedef struct node{ char date; struct node *next;}List;void InitList(List*head,int n){ List *p=head,*q; int i;char c; for(i=0;i<n;i++) { q =(List*)malloc(sizeof(Lis.
2022-04-26 16:57:34
330
原创 SWUST OJ 956: 约瑟夫问题的实现
#include <stdio.h>#include <stdlib.h>typedef struct node{ int date; struct node *next;}List;void createlist(List*head,int n)//创建循环链表读入数据{ int i; List *p=head,*q; for(i=1;i<=n;i++) { q =(List*)malloc(siz.
2022-04-26 14:58:42
185
原创 953: 单链表的删除操作的实现
#include <stdio.h>#include <stdlib.h>typedef struct node{ int date; struct node *next;}List;void createlist(List*head,int n){ int i; List *p=head,*q; for(i=0;i<n;i++) { q =(List*)malloc(sizeof(List)); .
2022-04-26 11:31:19
1331
原创 SWUST OJ 952: 单链表的插入操作的实现
#include <stdio.h>#include <stdlib.h>typedef struct node{ int date; struct node *next;}List;void InitList(List*head,int n)//创建第一个链表{ List *p,*q; p=head; int i; for(i=0;i<n;i++) { q=(List*)malloc(si.
2022-04-26 11:01:33
501
原创 SWUST OJ 954: 单链表的链接(C语言)
#include <stdio.h>#include <stdlib.h>typedef struct node{ char date; struct node *next;}List;void InitLink(List*head)//添加新的结点{ List *p,*q; int n,i; p=head;//p先指向头结点 scanf("%d",&n); for(i=0;i<n;i++) .
2022-04-25 19:27:50
1482
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人