- 博客(7)
- 问答 (2)
- 收藏
- 关注
原创 用栈解决迷宫问题
#include<stdio.h>#include<malloc.h>#define m 4#define n 4#define max 100int mg[m+2][n+2]={{1,1,1,1,1,1},{1,0,0,0,1,1},{1,0,1,0,0,1},{1,0,0,0,1,1},{1,1,0,0,0,1},{1,1,1,1,1,1}};typedef struct{ int i,j;//行,列 int di ;} box;typed.
2022-05-22 20:33:05
569
原创 循环队列解决报数问题
#include<stdio.h>#include<malloc.h>#define max 9typedef int elemtype;typedef struct{ elemtype data[max]; int front,rear;} que;void initque(que *&qu){ qu=(que *)malloc(sizeof(que)); qu->front=qu->rear=0;}void destroyque(.
2022-05-22 20:26:23
416
原创 十进制向二进制转换
#include<stdio.h>#include<malloc.h>#define max 9typedef int elemtype;typedef struct{ elemtype data[max]; int top;} sqstack;void initst(sqstack *&st){ st=(sqstack *)malloc(sizeof(sqstack)); st->top=-1;}bool pus...
2022-05-18 17:08:27
242
1
原创 单链表删除最大的结点
#include<stdio.h>#include<malloc.h>typedef int elemtype;typedef struct node{ struct node *next; elemtype data;}linknode;void createnode(linknode *&l,elemtype a[],int n) //创建单链表{ linknode *p,*q; l=(linknode *)m...
2022-05-12 11:00:43
1381
空空如也
循环队列输出杨辉三角时循环不能停止,求帮助
2022-05-23
c语言用栈解决迷宫问题,求各位帮助帮助
2022-04-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅