Logo

Programming-Idioms

History of Idiom 9 > diff from v1 to v2

Edit summary for version 2 by :

Version 1

2015-05-06, 21:04:47

Version 2

2015-08-21, 08:00:28

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
struct BinaryTree(T)
{
	T data;
	BinaryTree* left;
	BinaryTree* right;
}