mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-04 19:20:52 +08:00
build
This commit is contained in:
@@ -691,8 +691,8 @@ comments: true
|
||||
|
||||
def to_array(self) -> list[int]:
|
||||
"""返回数组用于打印"""
|
||||
node: ListNode | None = self.front
|
||||
res: list[int] = [0] * self.size()
|
||||
node = self.front
|
||||
res = [0] * self.size()
|
||||
for i in range(self.size()):
|
||||
res[i] = node.val
|
||||
node = node.next
|
||||
|
||||
@@ -1220,7 +1220,7 @@ comments: true
|
||||
|
||||
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())]
|
||||
|
||||
@@ -447,7 +447,7 @@ comments: true
|
||||
|
||||
def to_list(self) -> list[int]:
|
||||
"""转化为列表用于打印"""
|
||||
arr: list[int] = []
|
||||
arr = []
|
||||
node = self.__peek
|
||||
while node:
|
||||
arr.append(node.val)
|
||||
|
||||
Reference in New Issue
Block a user