From c619a05139c93fc0b8f8bb729cd9d400d076e935 Mon Sep 17 00:00:00 2001 From: Steve0x2a Date: Mon, 23 Aug 2021 15:31:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B90102=E4=BA=8C=E5=8F=89?= =?UTF-8?q?=E6=A0=91=E7=9A=84=E5=B1=82=E5=BA=8F=E9=81=8D=E5=8E=86Python?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原Python代码的队列变量名写错,无法运行。 --- problems/0102.二叉树的层序遍历.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/problems/0102.二叉树的层序遍历.md b/problems/0102.二叉树的层序遍历.md index 39160911..45f7ee69 100644 --- a/problems/0102.二叉树的层序遍历.md +++ b/problems/0102.二叉树的层序遍历.md @@ -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):