Files
Yudong Jin 2f561d3d51 feat(ko): add the Korean online edition (#2006)
* feat(ko): add the complete Korean online edition

* Use UTF-8 for Python CI output on Windows

* Remove print-book promotion from the Korean site

* fix(ko): preserve emphasis before Korean particles
2026-10-29 03:46:43 +08:00

25 lines
586 B
Go

// File: binary_tree_bfs_test.go
// Created Time: 2022-11-26
// Author: Reanon ([email protected])
package chapter_tree
import (
"fmt"
"testing"
. "github.com/krahets/hello-algo/pkg"
)
func TestLevelOrder(t *testing.T) {
/* 이진 트리 초기화 */
// 여기서는 배열로부터 이진 트리를 바로 생성하는 함수를 사용한다
root := SliceToTree([]any{1, 2, 3, 4, 5, 6, 7})
fmt.Println("\n이진 트리 초기화: ")
PrintTree(root)
// 레벨 순서 순회
nums := levelOrder(root)
fmt.Println("\n레벨 순서 순회의 노드 출력 순서 =", nums)
}