@ sourav.
By mistake added binary in 2nd sentence. Check now.
Heap Variants:
The only requirement to be a heap is it should be a complete tree.
also $\text{Almost complete binary tree}$
https://stackoverflow.com/questions/26327125/difference-between-complete-and-almost-complete-binary-tree
if last level of the tree are completely fill then it is complete binary tree
and if 2nd last level are completely filled but the last level is not completely filled then it is almost complete binary tree
So definition and examples given here are wrong i suppose.
https://www.geeksforgeeks.org/binary-tree-set-3-types-of-binary-tree/
According to it:
Complete Binary Tree: A Binary Tree is complete Binary Tree if all levels are completely filled except possibly the last level and the last level has all keys as left as possible
Following are examples of Complete Binary Trees
18 / \ 15 30 / \ / \ 40 50 100 40 18 / \ 15 30 / \ / \ 40 50 100 40 / \ / 8 7 9
let me see a binary tree with more than 2 children!!!!
@ Priyanka Agarwal yes you are right
Will be both Heap and B tree.
Variants:
Binary heap storage rules -- A heap implemented with a binary tree in which the following two rules are followed:
So heap needn't be binary always.
AVL tree is BST with balancing factor.
Source: https://www.cpp.edu/~ftang/courses/CS241/notes/heap.htm
Gatecse