refactor: Follow the PEP 585 Typing standard (#439)

* Follow the PEP 585 Typing standard

* Update list.py
This commit is contained in:
Yudong Jin
2023-03-23 18:51:56 +08:00
committed by GitHub
parent f4e01ea32e
commit 8918ec9079
43 changed files with 256 additions and 342 deletions

View File

@ -10,7 +10,7 @@ from modules import *
class MaxHeap:
""" 大顶堆 """
def __init__(self, nums: List[int]):
def __init__(self, nums: list[int]):
""" 构造方法 """
# 将列表元素原封不动添加进堆
self.max_heap = nums