Logo

Programming-Idioms

History of Idiom 9 > diff from v15 to v16

Edit summary for version 16 by :
[C] typo

Version 15

2016-02-16, 17:08:17

Version 16

2016-02-16, 17:09:30

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
struct treenode{
int value;
struct treenode* left;
struct treenode* right
}
Code
struct treenode{
int value;
struct treenode* left;
struct treenode* right;
}