Logo

Programming-Idioms

History of Idiom 9 > diff from v4 to v5

Edit summary for version 5 by :

Version 4

2015-08-22, 23:16:46

Version 5

2015-08-24, 01:48:22

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 his 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 his parent.

Code
type
  generic BinTree<T> = class
    Value: T;
    Left, Right: BinTree;
  end;