Simplify the declarations of the Python code.

This commit is contained in:
krahets
2023-05-22 22:03:57 +08:00
parent 081b76d620
commit e196962d0a
27 changed files with 88 additions and 87 deletions

View File

@ -64,7 +64,7 @@ if __name__ == "__main__":
# 输入列表并建堆
# 时间复杂度为 O(n) ,而非 O(nlogn)
min_heap: list[int] = [1, 3, 2, 5, 4]
min_heap = [1, 3, 2, 5, 4]
heapq.heapify(min_heap)
print("\n输入列表并建立小顶堆后")
print_heap(min_heap)