Logo

Programming-Idioms

History of Idiom 9 > diff from v34 to v35

Edit summary for version 35 by tkoenig:
New Clojure implementation by user [tkoenig]

Version 34

2019-09-26, 16:42:33

Version 35

2019-09-26, 20:28:07

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
type treenode
  integer :: value
  type (treenode), pointer :: left
  type (treenode), pointer :: right
end type treenode