摘要: 一、ZooKeeper 是一个针对大型分布式系统的 协调系统; 二、ZooKeeper架构 1、特性: a. 客户端可以连接到每个server。 b. 每个follower都和leader有连接,接受leader的数据更新操作。 c. Server记录事务日志和快照到持久存储,每个server的数据 阅读全文
posted @ 2017-06-14 01:45 mzzcy 阅读(152) 评论(0) 推荐(0)
摘要: int hight_tree(bintree t){ int h,left,right; if(!t){ return 0; } left = hight_tree(t->lchild); right = hight_tree(t->rchild); h = (left>right?left:right)+1; return... 阅读全文
posted @ 2017-06-14 00:58 mzzcy 阅读(109) 评论(0) 推荐(0)
摘要: 方法一: 方法二:使用l队列 其它可参考: 层次遍历二叉树-三种不同的方法 数据结构(六)——二叉树 前序、中序、后序、层次遍历及非递归实现 查找、统计个数、比较、求深度的递归实现 阅读全文
posted @ 2017-06-14 00:56 mzzcy 阅读(296) 评论(0) 推荐(0)