iltonmi's docs

随笔分类 -  数据结构

二叉堆和优先级队列
摘要:参考资料:Algorithms, 4th 精髓 In a heap, the parent of the node in position k is in position ⎣k /2⎦ and, conversely, the two children of the node in positio 阅读全文

posted @ 2021-01-26 00:41 iltonmi 阅读(58) 评论(0) 推荐(0)

红黑树和2-3树
摘要:参考资料:Algorithms, 4th 背景:红黑树来源于2-3树。 解决的问题:2-3树通过代码难实现。2-3树作为平衡二叉树在树高方面有优势,但是在插入操作时维护树结构的操作过于繁琐,导致时间复杂度没有明显优势。 方法:为节点间的links添加颜色,用node和link对2-node和3-no 阅读全文

posted @ 2021-01-26 00:35 iltonmi 阅读(141) 评论(0) 推荐(0)

并查集
摘要:资料来源于The algorithm design manual 问题引入 考虑以下2个操作: Same component(v1,v2)– Do vertices v1 and v2 occur in the same connected component of the current grap 阅读全文

posted @ 2021-01-25 21:17 iltonmi 阅读(101) 评论(0) 推荐(0)

导航