You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Solution:
def bfs(k):
...
for _ in range(size):
...
if node.left:
queue.append(node.left)
if node.right:
queue.append(node.right)
# 遍历完当前层所有的节点后 steps + 1
steps += 1
return ans
The text was updated successfully, but these errors were encountered:
上述模版,入队的顺序调整为:
The text was updated successfully, but these errors were encountered: