Logo

Programming-Idioms

History of Idiom 9 > diff from v17 to v18

Edit summary for version 18 by :
New Python implementation by user [TinyFawks]

Version 17

2016-02-16, 19:42:12

Version 18

2016-02-18, 16:57:56

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;
}