Full binary tree vs complete binary tree | Strict binary tree vs complete binary tree

 A binary tree of height "h" having maximum number of nodes is called full binary tree.


When a binary tree is represented in an array and there is no blank spaces in the tree between the nodes then tree is called complete binary tree.
Or, A complete binary tree of height h will be a full binary tree upto height (h-1).


1. A full binary tree is always a complete binary tree

2. To represent a tree in an array we should have complete binary tree else there will be empty spaces between elements.

Strict binary tree has 0 or 2 nodes. Strict binary tree may or may not be complete binary tree.



Comments

Popular posts from this blog

SQL basic interview question

gsutil Vs Storage Transfer Service Vs Transfer Appliance