Heap Coding Questions asked in Interviews Last Updated : 20 Sep, 2025 Suggest changes Share 7 Likes Like Report A Heap is a special Tree-based Data Structure in which the tree is a complete binary tree. Generally, heaps are of two types: Max-Heap and Min-Heap. To know more about this Data Structure in-depth refer to the Tutorial on Heap Data-Structure. Easy Problems Heap SortKth Smallest ElementMinimum product of k in an arraySort an Almost Sorted Array Min sum of two numbers from DigitsSum between k1’th and k2’th smallest K Closest Points to the OriginMedium ProblemsTop K Frequent Rearrange charactersConvert min Heap to max HeapCheck if a Binary Tree is a Min Heap kth smallest element in a row-column sorted matrix Connect n ropes with min costMerge two binary max heapsFind k closest numbers K’th largest in a streamk numbers with most occurrences in array Game with String Maximize The Array Min sum of squares of counts after removing kMaximum sum of Two Non-Overlapping IntervalsK-th Largest Sum Subarray Room with Maximum Meetings BST to Max HeapHard ProblemsMerge k sorted arraysMerge k Sorted ListsMedian of a streamSmallest range in K listsHuffman EncodingMinimum cost to connect all citiesSingle-Source Shortest Paths – Dijkstra’s AlgorithmSliding Window MaximumK maximum sum combinations from two arrays.Related ArticlesDSA TutorialProblems on Stack for InterviewsDynamic Programming Coding Problems for InterviewsProblems on Linked List for InterviewsProblems on Queue for Interviews Create Quiz R RishabhPrabhu Follow 7 Article Tags : Heap DSA Interview-Questions GFG Sheets top-dsa-problems DSA Sheet +2 More Explore DSA FundamentalsLogic Building Problems 2 min read Analysis of Algorithms 1 min read Data StructuresArray Data Structure 3 min read String in Data Structure 2 min read Hashing in Data Structure 2 min read Linked List Data Structure 2 min read Stack Data Structure 2 min read Queue Data Structure 2 min read Tree Data Structure 2 min read Graph Data Structure 3 min read Trie Data Structure 15+ min read AlgorithmsSearching Algorithms 2 min read Sorting Algorithms 3 min read Introduction to Recursion 15 min read Greedy Algorithms 3 min read Graph Algorithms 3 min read Dynamic Programming or DP 3 min read Bitwise Algorithms 4 min read AdvancedSegment Tree 2 min read Binary Indexed Tree or Fenwick Tree 15 min read Square Root (Sqrt) Decomposition Algorithm 15+ min read Binary Lifting 15+ min read Geometry 2 min read Interview PreparationInterview Corner 3 min read GfG160 3 min read Practice ProblemGeeksforGeeks Practice - Leading Online Coding Platform 6 min read Problem of The Day - Develop the Habit of Coding 5 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like