This commit is contained in:
krahets
2023-02-08 22:16:25 +08:00
parent 30ed83e5b1
commit af3542e3c0
17 changed files with 258 additions and 100 deletions

View File

@@ -165,7 +165,7 @@ comments: true
```csharp title="binary_tree_bfs.cs"
/* 层序遍历 */
public List<int?> hierOrder(TreeNode root)
List<int> hierOrder(TreeNode root)
{
// 初始化队列,加入根结点
Queue<TreeNode> queue = new();
@@ -183,7 +183,6 @@ comments: true
}
return list;
}
```
=== "Swift"