R*******N 发帖数: 7494 | 1 怎样在C++中表示一个binary tree呢?
用几维数组? |
e*****t 发帖数: 1005 | 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呢? : 用几维数组?
|
I**********s 发帖数: 441 | 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. |
R*******N 发帖数: 7494 | 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.
|
I**********s 发帖数: 441 | |