Heap and heap sort

Introduction to heap Heap are complete binary tress. By complete, I mean each node except the leaf nodes has two children. Binary heaps are represented using array data structure. Unlike binary search tree, duplicates are allowed in heap. Max Heap – Value of each node must be greater than or equal to its children. Min … Continue reading Heap and heap sort