04 2018 档案

摘要:public class BBST, Value> { private Node root; public class Node { private Key key; private Value val; private Node parent, left, right; private int height; ... 阅读全文
posted @ 2018-04-24 13:04 INnoVation-V2 阅读(157) 评论(0) 推荐(0) 编辑
摘要:import java.util.LinkedList; import java.util.Queue; import java.util.Stack; public class BST, Value> { private Node root; public class Node { private Key key; private Value... 阅读全文
posted @ 2018-04-23 00:31 INnoVation-V2 阅读(207) 评论(0) 推荐(0) 编辑
摘要:一、定义 下图为一标准红黑树 紫色为黑高度 满足如下要求的树是红黑树 1.每个节点不是红色就是黑色 2.根节点和叶节点(NIL)都是黑色 注:NIL节点即空节点,实际不存在,是我们为了便于处理边界情况添加的,我们将NIL节点叫叶节点,这样原本红黑树中的叶节点就变成了内节点。NIL与普通节点具有相同属 阅读全文
posted @ 2018-04-18 02:21 INnoVation-V2 阅读(244) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示