mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 21:24:53 +08:00
refactor: Follow the PEP 585 Typing standard (#439)
* Follow the PEP 585 Typing standard * Update list.py
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user