摘要: 二叉树性质: 二叉树第i层至多有pow(2,i-1)个节点; 深度为k的二叉树最多有pow(2,i)-1个节点 n=n0+n1+n2;n-1=n1*2n2; >n0=n2+1; 具有n个节点的深度为pow(log2,n)+1 i=0,左孩子为2i+1,右孩子为2i+2;i=1,左孩子为2i,右孩子为 阅读全文
posted @ 2021-11-13 20:33 不负韶华。 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 困难一:不懂得怎么部署接口到腾讯云服务器上(windows服务器) 1.下载,安装,配置wamp(php的集成环境)(3条消息) Wamp安装与配置_皇家小骑士-CSDN博客_wamp配置 注意:一定要下载vc++的三个版本插件,否则会报缺少ddl的错误,我就是因为这个弄了半天不行 2.配置完后一定 阅读全文
posted @ 2021-09-27 22:48 不负韶华。 阅读(327) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> #define OK 1 #define ERROR 0 #define MAXQSIZE 3 typedef int Status; typedef int ElemType; typedef struct QNode{ ElemType *bas 阅读全文
posted @ 2021-09-23 21:08 不负韶华。 阅读(12) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> #define OK 1 #define ERROR 0 typedef int Status; typedef int ElemType; typedef struct QNode{ ElemType data; struct QNode *nex 阅读全文
posted @ 2021-09-23 20:27 不负韶华。 阅读(23) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> typedef struct Node{ int coe;//系数 int index;//指数 struct Node *next; }LNode,*LinkList; void create(LinkList &L,i 阅读全文
posted @ 2021-09-16 21:05 不负韶华。 阅读(35) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; void find_pos(){ string a="abcd123bcdaa"; cout <<a.find("bcd")<<endl;//find返回字符串第一个字符的位置 :从头找查找第一次出现的位置 阅读全文
posted @ 2021-09-10 17:55 不负韶华。 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 1025 反转链表 (25 分) 给定一个常数 K 以及一个单链表 L,请编写程序将 L 中每 K 个结点反转。例如:给定 L 为 1→2→3→4→5→6,K 为 3,则输出应该为 3→2→1→6→5→4;如果 K 为 4,则输出应该为 4→3→2→1→5→6,即最后不到 K 个元素不反转。 输入格 阅读全文
posted @ 2021-09-08 20:43 不负韶华。 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 7-23 币值转换 (20 分) 输入一个整数(位数不超过9位)代表一个人民币值(单位为元),请转换成财务要求的大写中文格式。如23108元,转换后变成“贰万叁仟壹百零捌”元。为了简化输出,用小写英文字母a-j顺序代表大写数字0-9,用S、B、Q、W、Y分别代表拾、百、仟、万、亿。于是23108元应 阅读全文
posted @ 2021-08-19 17:42 不负韶华。 阅读(277) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <math.h> #include <ctype.h>//用来判断字符是不是数字 #define OK 1 #define ERROR 0 #define MAX_INIT_SIZE 100 #defin 阅读全文
posted @ 2021-08-15 22:00 不负韶华。 阅读(55) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <math.h> #define OK 1 #define ERROR 0 #define MAXSIZE 10 typedef char ElemType; typedef int Status; ty 阅读全文
posted @ 2021-08-15 12:37 不负韶华。 阅读(311) 评论(0) 推荐(0) 编辑