mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-13 18:00:18 +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
|
||||
|
||||
Reference in New Issue
Block a user