A Tour of Go Exercise: 69 Equivalent Binary Trees
摘要:
如其广告所言,Go用于写Equivalent Binary Trees确实简便优雅 1 package main 2 3 import "tour/tree" 4 import "fmt" 5 6 // Walk walks the tree t sending all values 7 // from the tree to the channel ch. 8 func Walk(t *tree.Tree, ch chan int){ 9 if t == nil {10 return11 }12 Walk(t.Left, ch)13 ch ... 阅读全文
posted @ 2012-05-20 23:35 Spray 阅读(213) 评论(0) 推荐(0)
浙公网安备 33010602011771号