1. Heap 1 2. Heap Definition in Data Structure Heap: A special form of complete binary tree that key value of each node is no smaller (larger) than the key value of…