Skip to content

Commit e8e6fe5

Browse files
committed
Add missing docs to heap lesson
1 parent 2fad614 commit e8e6fe5

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • ultimatepython/data_structures

ultimatepython/data_structures/heap.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
"""
2+
A heap is a specialized tree-based data structure that satisfies the heap
3+
property: in a min-heap every parent node is smaller than or equal to its
4+
children, and in a max-heap every parent is greater than or equal to its
5+
children. This module demonstrates how to build and interact with both
6+
min-heaps and max-heaps using Python's built-in heapq module.
7+
"""
8+
19
import heapq
210

311

0 commit comments

Comments
 (0)