Redian新闻
>
有编过binary tree搜索的没?
avatar
有编过binary tree搜索的没?# CS - 计算机科学
R*N
1
怎样在C++中表示一个binary tree呢?
用几维数组?
avatar
e*t
2
both tree and array are typical data structures.
why you want to use an array to store a tree?

【在 R*******N 的大作中提到】
: 怎样在C++中表示一个binary tree呢?
: 用几维数组?

avatar
I*s
3
You better use linked structure. Use array for tree is rare, one notable
exception is the heap which is a balanced binary tree and all the external
nodes are in the left-most positions, so there is no hole in the array
representation.
avatar
R*N
4
How to define a link structure?
I am using MFC, is there any MFC class for this data structure?

【在 I**********s 的大作中提到】
: You better use linked structure. Use array for tree is rare, one notable
: exception is the heap which is a balanced binary tree and all the external
: nodes are in the left-most positions, so there is no hole in the array
: representation.

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