A min-heap is a special type of binary tree used in computer science to efficiently manage a collection of numbers. In a min-heap, the smallest number is always at the top, or the "root" of the tree. Each parent node is less than or equal to its child nodes, which ensures that the smallest element can be quickly accessed. This structure is useful for tasks like sorting and priority queues.
When you add or remove elements from a min-heap, it automatically rearranges itself to maintain this order. Operations like inserting a new number or extracting the smallest number are done in logarithmic time, making min-heaps efficient for managing dynamic datasets.