自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 C++递归算法实现二叉树的前、中、后序遍历

#include<iostream> #define OK 1 #define ERROR 0 #define OVERFLOW -1 typedef int Status; typedef char ElemType; using namespace std; typedef struct BiTNode{ ElemType data; struct BiTNode *lchild,*rchild; }BiTNode,*BiTree; //前序遍历建立二叉树 Status Cre.

2022-05-29 16:52:03 268 1

原创 C++,简单循环队列的实现

#include<iostream> #define MAXQSIZE 100 #define OK 1 #define ERROR 0 #define OVERFLOW -1 typedef int QElemType; typedef int Status; using namespace std; typedef struct{ QElemType *base; int front; int rear; }SqQueue; //循环队列的初始化 Status InitQueu.

2022-05-22 21:55:20 291 1

原创 C++,简单的顺序栈

#include<iostream> #define MAXSIZE 100 #define OK 1 #define ERROR 0 #define OVERFLOW -2 using namespace std; typedef int ElemType; typedef int Status; //定义栈 typedef struct{ ElemType * base; ElemType * top; int stackSize; }sqStack; //栈的初始化 Statu.

2022-05-09 19:16:30 300 2

原创 C++,一个简单的顺序表

#include<iostream> #define MAXSIZE 100 #define OK 1 #define ERROR 0 #define OVERFLOW -2 using namespace std; typedef int Status; typedef int ElemType; //定义顺序表 typedef struct{ int *elem; int length; }SqList; //初始化顺序表 Status InitList(SqList &.

2022-04-23 19:48:00 1340 1

原创 用C语言实现输入某年某月某天,求这个日期在该年的第几天

代码如下: #include<stdio.h> int main() { int total; int year,leap,day,i,mon; int m=0; int mon_1[12]={31,29,31,30,31,30,31,31,30,31,30,31}; int mon_2[12]={31,28,31,30,31,30,31,31,30,31,30,31}; printf("Please input year:\n"); scanf("%d",&year)

2021-11-29 22:05:08 1447

原创 任意输入n位整数从小到大排序输出(动态数组指针结合实现)

来自一个c语言初学者突发奇想解决的一个困惑蛮久的简单问题 代码如下: #include<stdio.h> #include<stdlib.h> void sort(int * a,int L); int main() { int len; int i; int * pArr; printf("Please input the array length:\n"); scanf("%d",&len); pArr=(int *)malloc(s...

2021-11-27 15:13:45 1704 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除