- 博客(2)
- 资源 (2)
- 收藏
- 关注
原创 HihoCoder第十周——已知前序中序求后序
思路我们定义post_order(str1, str2)为一棵前序遍历的结果为str1,中序遍历的结果为str2的二叉树的后序遍历的结果。 如果要求解post-order(str1, str2)的话,首先不难发现,根据‘前序遍历’str1=‘根节点’+‘左子树的前序遍历’+‘右子树的前序遍历’,我可以知道这棵二叉树的根节点root便是str1的第一个字符。 在知道了‘根节点’root之后,便可以
2017-07-17 21:48:55 311
原创 IO复用函数select poll epoll
select#include <sys/select.h> #include <sys/time.h> int select(int maxfdp1,fd_set *readset,fd_set *writeset,fd_set *exceptset,const struct timeval *timeout)返回值:就绪描述符的数目,超时返回0,出错返回-1 第一个参数maxfdp1指定待测试的描
2017-07-11 21:52:21 484
C++开源协程库libco-原理与应用
2018-01-28
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人