【GoLang笔记】A Tour of Go - Exercise: Equivalent Binary Trees
本文是GoLang学习教程中的一道习题,具体题目要求及代码实现如下。 Exercise: Equivalent Binary Trees 1. Implement the Walk function. 2. Test the Walk function. The function tree.New(k) constructs a randomly-structured binary tree holding the values k,2k, 3k, ..., 10k. Create a new channel ch and kick off the walker: go Walk(tree.New(1), ch) Then read and print 10 values from the ...阅读全文