Binary tree

A binary tree is a tree where each node has a max of two children. A complete binary tree is a binary tree where every level is completely filled. A balance binary tree is a binary tree where the right and left sub-trees of every node differ by no more than 1 level.

Traversals

Given the following binary tree:

flowchart TD
	1([1])
	2([2])
	7([7])
	6([6])
	5([5])
	11([11])
	9([9])
	9a([9])
	5a([5])
	1 --> 7
	7 --> 2
	7 --> 6
	6 --> 5
	6 --> 11
	1 --> 9
	9 --> 9a
	9a --> 5a

References