V
Vinodh
Started reading about Binary Trees and got the following questions in
mind. Please help.
Definition of a Binary Tree from "Data Structures using C and C++ by
Tanenbaum" goes like this,
"A binary tree is a finite set of elements that is either empty or is
partitioned into three disjoint subsets. The first subset contains a
single element called the 'Root' of the tree. The other two subsets
are themselves binary trees, called the 'Left' and 'Right' subtrees of
the original tree."
My Questions:
1) Why they talk about a binary tree that is totally empty? I mean a
binary tree with Zero elements?
2) A binary tree is partioned into three disjoint subsets. That means
all the elements in a binary tree should be unique? Duplicate elements
are allowed within a subtree? Any significance of this?
Thanks,
Vinodh
mind. Please help.
Definition of a Binary Tree from "Data Structures using C and C++ by
Tanenbaum" goes like this,
"A binary tree is a finite set of elements that is either empty or is
partitioned into three disjoint subsets. The first subset contains a
single element called the 'Root' of the tree. The other two subsets
are themselves binary trees, called the 'Left' and 'Right' subtrees of
the original tree."
My Questions:
1) Why they talk about a binary tree that is totally empty? I mean a
binary tree with Zero elements?
2) A binary tree is partioned into three disjoint subsets. That means
all the elements in a binary tree should be unique? Duplicate elements
are allowed within a subtree? Any significance of this?
Thanks,
Vinodh