Merge Two Binary Max Heaps
Given two binary max heaps, the task is to merge the given heaps to form a new max heap. Examples :Â Input: a[] = {10, 5, 6, 2}, b[] = {12, 7, 9}Output: {12, 10, 9, 2, 5, 7, 6} Input: a[] = {2, 5, 1, 9, 12}, b[] = {3, 7, 4, 10}Output: {12, 10, 7, 9, 5, 3, 1, 4, 2} Table of Content [Naive Approach] U