会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
卢铭浩
博客园
首页
新随笔
联系
订阅
管理
2021年2月1日
Android socket收发中文
摘要: 接收信息分字符流和字节流 字节流: byte[] buffer = new byte[1024]; //字节数组buffer InputStream inputStream = socket.getInputStream();//获取字节流 int len = inputStream.read(bu
阅读全文
posted @ 2021-02-01 12:08 倔强的不死人
阅读(215)
评论(0)
推荐(0)
2021年1月27日
stun服务器下载和安装 报错may be you have just too old libevent tool - then you have to upgrade it
摘要: 转载:https://blog.csdn.net/n_fly/article/details/100807778
阅读全文
posted @ 2021-01-27 15:21 倔强的不死人
阅读(422)
评论(0)
推荐(0)
2020年11月24日
二叉树——复制、计算深度、统计节点数、统计叶子节点数、比较两个树、交换左右子树节点、双序遍历
摘要: void copy(BiTree T,BiTree &NewT){ //复制树 if(T == NULL){ NewT = NULL; return; }else { NewT = new BiTNode; NewT->data = T->data; copy(T->lchild,NewT->lch
阅读全文
posted @ 2020-11-24 22:13 倔强的不死人
阅读(310)
评论(0)
推荐(0)
二叉树——统计每层节点个数
摘要: static int w =0; //统计每层节点个数,从而找出最大层数 static int Wid[10]={0}; void Width(BiTree T){ if(T == NULL) return; else { w++; Wid[w]++; Width(T->lchild); if(T-
阅读全文
posted @ 2020-11-24 22:10 倔强的不死人
阅读(1368)
评论(0)
推荐(0)
二叉树——按层次顺序遍历(队列实现)
摘要: 通过队列就可以方便的将同一层的节点连续地存放在一起 static LinkQueue Q ; //定义一个队列 void levelTraverse(BiTree T){ BiTree e; if(T){ EnQueue(Q,T); //入队列 while(Q.front != Q.rear){ D
阅读全文
posted @ 2020-11-24 21:31 倔强的不死人
阅读(818)
评论(0)
推荐(0)
2020年11月23日
二叉树——创建、前、中、后序遍历(递归、非递归)
摘要: //"LinkStack.h" #include<iostream> using namespace std; #define LElemType BiTree #define MAXSIZE 100 typedef struct BiTNode{ char data; struct BiTNode
阅读全文
posted @ 2020-11-23 15:31 倔强的不死人
阅读(224)
评论(0)
推荐(0)
2020年11月22日
数组——n个整数存放在数组中,将正数排在负数前,时间复杂度为O(n)
摘要: #include<iostream> #include <cstring> #include <fstream> using namespace std; #define MAXLEN 255 /* n个整数存放在数组中,将正数排在负数前,时间复杂度为O(n) */ void change(int
阅读全文
posted @ 2020-11-22 16:27 倔强的不死人
阅读(350)
评论(0)
推荐(0)
递归实现逆序,不另外设串存储空间
摘要: 1.从输入到存储时就改变存储的顺序 void InvertStore(char a[]){ char ch; static int i = 0; cin >> ch; if(ch != '.'){ InvertStore(a); a[i++] = ch; } a[i] = '\0'; //结束符 }
阅读全文
posted @ 2020-11-22 15:00 倔强的不死人
阅读(453)
评论(0)
推荐(0)
2020年11月21日
KMP算法——nextval的会用计算
摘要: 对nextval的实现还暂时停留在会算的地步上 No 1 2 3 4 5 6 7 8 9 10 11 12 13 14 a b a c b a a a b c a b a a next 0 1 1 2 1 1 2 2 2 3 1 2 3 4 nextval 0 1 0 2 1 0 2 2 1 3 0
阅读全文
posted @ 2020-11-21 21:19 倔强的不死人
阅读(363)
评论(0)
推荐(0)
串——病毒检测:BF检测
摘要: #include<iostream> #include <cstring> #include <fstream> using namespace std; #define MAXLEN 20 /* 病毒检测,BF算法,匹配子串 */ typedef struct{ char ch[MAXLEN+1]
阅读全文
posted @ 2020-11-21 20:18 倔强的不死人
阅读(469)
评论(0)
推荐(0)
下一页
公告