func CreateLevelLinkedListBFS(root *tree.Tree) []*list.List {
	var result []*list.List
	current := list.New()
	current.PushBack(root)
	for current.Len() != 0 {
		result = append(result, current)
		parent := current
		current = list.New()
		for e := parent.Front(); e != nil; e = e.Next() {
			tr := e.Value.(*tree.Tree)
			if tr.Left != nil {
				current.PushBack(tr.Left)
			}
			if tr.Right != nil {
				current.PushBack(tr.Right)
			}
		}
	}
	return result
}
// CreateLevelLinkedListBFS solves ch04-p03

CreateLevelLinkedListBFS solves ch04-p03
// CreateLevelLinkedListBFS solves ch04 - p03
func CreateLevelLinkedListBFS(root *tree.Tree) []*list.List {
	var result []*list.List
	current := list.New()
	current.PushBack(root)
	for current.Len() != 0 {
		result = append(result, current)
		parent := current
		current = list.New()
		for e := parent.Front(); e != nil; e = e.Next() {
			tr := e.Value.(*tree.Tree)
			if tr.Left != nil {
				current.PushBack(tr.Left)
			}
			if tr.Right != nil {
				current.PushBack(tr.Right)
			}
		}
	}
	return result
}
func CreateLevelLinkedListBFS ( root * tree . Tree ) [ ] * list . List { var result [ ] * list . List current := list . New ( ) current . PushBack ( root ) for current . Len ( ) != 0 { result = append ( result , current ) parent := current current = list . New ( ) for e := parent . Front ( ) ; e != nil ; e = e . Next ( ) { tr := e . Value . ( * tree . Tree ) if tr . Left != nil { current . PushBack ( tr . Left ) } if tr . Right != nil { current . PushBack ( tr . Right ) } } } return result }
CreateLevelLinkedListBFS solves ch04-p03
CreateLevelLinkedListBFS solves ch04 - p03