Logo

Programming-Idioms

History of Idiom 9 > diff from v18 to v19

Edit summary for version 19 by :
New Csharp implementation by user [Marti_2203]

Version 18

2016-02-18, 16:57:56

Version 19

2016-02-20, 17:34:40

Idiom #9 Create a Binary Tree data structure

The structure must be recursive because left child and right child are binary trees too. A node has access to children nodes, but not to its parent.

Idiom #9 Create a Binary Tree data structure

The structure must be recursive because left child and right child are binary trees too. A node has access to children nodes, but not to its parent.

Code
class BinaryTree<T>:IComparable<T>
{
 T value;
 BinaryTree<T> leftChild;
 BinaryTree<T> rightChild;
}