A basic set of interfaces or abstract classes that all the tree data structures can be built upon. Containing basic properties and methods needed by every tree. Such as
Tree Node
Properties
[ ] Parent Nodetype: Node
Node should have a property that points to its parent node.
[ ] Keytype: any
Node should have a property that contains the key of the node. Upon which all the operations in the Trees are based.
[ ] isRootNodetype: boolean
Node should have a property that shows if the node is the root node for a tree. i.e. It has no parent node.
~~Value/Data/MetaDatatype: any
Node should have a property that can hold value or arbitrary data or metadata for the node.~~
A basic set of interfaces or abstract classes that all the tree data structures can be built upon. Containing basic properties and methods needed by every tree. Such as
Tree Node
Properties
type: Node
Node should have a property that points to its parent node.type: any
Node should have a property that contains thekey
of the node. Upon which all the operations in the Trees are based.type: boolean
Node should have a property that shows if the node is the root node for a tree. i.e. It has no parent node.type: any
Node should have a property that can holdvalue
orarbitrary data
ormetadata
for the node.~~References