mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 04:31:55 +08:00
1. Add build script for Java.
2. Add height limitation for code blocks in extra.css. 3. Fix "节点" to "结点".
This commit is contained in:
@ -18,7 +18,7 @@ public class binary_tree_bfs {
|
||||
List<Integer> list = new ArrayList<>();
|
||||
while (!queue.isEmpty()) {
|
||||
TreeNode node = queue.poll(); // 队列出队
|
||||
list.add(node.val); // 保存结点
|
||||
list.add(node.val); // 保存结点值
|
||||
if (node.left != null)
|
||||
queue.offer(node.left); // 左子结点入队
|
||||
if (node.right != null)
|
||||
|
||||
Reference in New Issue
Block a user