mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-09 03:34:02 +08:00
修改0102二叉树的层序遍历Python代码
原Python代码的队列变量名写错,无法运行。
This commit is contained in:
@ -93,10 +93,10 @@ class Solution:
|
||||
if not root:
|
||||
return []
|
||||
|
||||
quene = [root]
|
||||
queue = [root]
|
||||
out_list = []
|
||||
|
||||
while quene:
|
||||
while queue:
|
||||
length = len(queue)
|
||||
in_list = []
|
||||
for _ in range(length):
|
||||
|
Reference in New Issue
Block a user