Where is a heap data structure typically used?