Logo

Programming-Idioms

History of Idiom 17 > diff from v7 to v8

Edit summary for version 8 by :

Version 7

2015-08-23, 11:02:14

Version 8

2015-08-23, 22:47:34

Idiom #17 Create a Tree data structure

The structure must be recursive. A node may have zero or more children. A node has access to children nodes, but not to his parent.

Idiom #17 Create a Tree data structure

The structure must be recursive. A node may have zero or more children. A node has access to children nodes, but not to his parent.

Code
type
  TTree = class
    Children: array of TTree;
    Data: TObject;
  end;