mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-07 23:04:55 +08:00
Simplify the declarations of the Python code.
This commit is contained in:
@ -53,7 +53,7 @@ class ArrayQueue:
|
||||
|
||||
def to_list(self) -> list[int]:
|
||||
"""返回列表用于打印"""
|
||||
res: list[int] = [0] * self.size()
|
||||
res = [0] * self.size()
|
||||
j: int = self.__front
|
||||
for i in range(self.size()):
|
||||
res[i] = self.__nums[(j % self.capacity())]
|
||||
|
Reference in New Issue
Block a user