Learning DSA 4 (Binary Tree-2)

Learning DSA 4 (Binary Tree-2)

Photo by Susan Q Yin on Unsplash

Properties of Binary Tree

  1. The maximum number of nodes at level ‘l’ of a binary tree is 2l .
  1. The Maximum number of nodes in a binary tree of height ‘h’ is 2h – 1.

  2. In a Binary Tree with N nodes, the minimum possible height or the minimum number of levels is Log2(N+1).

  3. A Binary Tree with L leaves has at least | Log2L |+ 1 levels.

  4. In a Binary tree where every node has 0 or 2 children, the number of leaf nodes is always one more than nodes with two children.

  5. In a non-empty binary tree, if n is the total number of nodes and e is the total number of edges, then e = n-1.

Max Heap is considered the best data structure to find the maximum value in a given set of data

source: gfg