![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
Leonardo.me
这个作者很懒,什么都没留下…
展开
-
快速排序程序演示
#include<stdio.h> void QuickSort(int*,int,int); int Located(int*,int,int); int main(void) { int i; int a[6]={7,9,3,5,8,4}; QuickSort(a,0,5); for(i=0;i<6;i++) { printf("%d ",a[i]); } return 0; } void QuickSort(int* a,int low,int high) { .原创 2022-02-02 01:35:06 · 111 阅读 · 0 评论 -
二叉树程序演示
#include<stdio.h> #include<stdlib.h> struct BTNode{ char character; struct BTNode* pLchild; struct BTNode* pRchild; }; struct BTNode* CreatBTree(void); void PreTraverseTree(struct BTNode*);//先序遍历 void InTraverseTree(struct BTNode*);//中序遍历 .原创 2022-02-01 21:04:50 · 1183 阅读 · 0 评论 -
汉诺塔程序演示
#include<stdio.h> void hannuota(int,char,char,char); int main(void) { int i; char ch1='A',ch2='B',ch3='C'; printf("请输入盘子的个数\n"); scanf("%d",&i); hannuota(i,ch1,ch2,ch3); return 0; } void hannuota(int n,char A,char B,char C) { if(1==n) { .原创 2022-01-10 00:10:17 · 189 阅读 · 0 评论 -
动态栈程序演示
#include<stdio.h> #include<stdlib.h> #include<stdbool.h> struct Node{ int data; struct Node* next; }; struct Stack{ struct Node* pTop; struct Node* pBottom; }; void init(struct Stack*); void push(struct Stack*,int); bool pop(struct St原创 2022-01-09 13:47:38 · 322 阅读 · 0 评论 -
循环队列程序演示
#include<stdio.h> #include<stdlib.h> #include<stdbool.h> # define N 7 struct Queue{ int *pBase; int front; int rear; }; void init(struct Queue*); bool is_full(struct Queue*); bool is_empty(struct Queue*); bool en_queue(struct Queue*,i.原创 2022-01-08 22:11:46 · 334 阅读 · 0 评论 -
洛谷p4956Davor C语言
#include<stdio.h> int main(void) { int x=1,k=1,m=100; int n; scanf("%d",&n); for(x=1;x<=m;x++) { if((7x+21kn/52)) { printf("%d\n%d",x,k); break; } if(xm&&7x+21k!=n/52) { m=m-1; x=1; if(m==1&&7x+21k!=n/52) { m=100; k++; } } } re原创 2021-11-20 21:17:41 · 803 阅读 · 0 评论