S
Sean
Hi all,
I have a question here regarding implementing Binary Tree.
I understand that Binary Tree can be implemented in one of
the following methods:
1)using nodes with pointers to two children.
2)using an array where children of node with index n are
at indices 2n and 2n+1.
Which of the above methods is more efficient and why is it
so?
Thank you very much in advance.
Sean
I have a question here regarding implementing Binary Tree.
I understand that Binary Tree can be implemented in one of
the following methods:
1)using nodes with pointers to two children.
2)using an array where children of node with index n are
at indices 2n and 2n+1.
Which of the above methods is more efficient and why is it
so?
Thank you very much in advance.
Sean