# What does a heap do?

In this tutorial, we'll learn about heaps, a very interesting data structure. Heaps are a data-structure that efficiently support the following operations

**Insert / Push**: Insert a new element to a set**Delete-min / Pop**: Find and remove the smallest element in the set

Note that the operations can be performed *multiple times and in any order*. (Also, note that actual implementations also support operation **top**, which returns the smallest element, but does not remove it from the heap).

The following is a sample interaction we would want with a heap.

code | set of elements | result