Redian新闻
>
how to implement binary tree efficiently?
avatar
how to implement binary tree efficiently?# Programming - 葵花宝典
y*h
1
such that I have random access to all nodes at particular level of the
tree.
Like fast access to all nodes on level 3.
avatar
w*p
2
Methods for storing binary trees
Binary trees can be constructed from programming language primitives in
several ways. In a language with records and references, binary trees are
typically constructed by having a tree node structure which contains some
data and references to its left child and its right child. Sometimes it also
contains a reference to its unique parent. If a node has fewer than two
children, some of the child pointers may be set to a special null value, or
to a special sentinel

【在 y*h 的大作中提到】
: such that I have random access to all nodes at particular level of the
: tree.
: Like fast access to all nodes on level 3.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。