小编Jin*_*nux的帖子

Equivalent Binary Trees Exercise, achieving the "concurrency"

I'm solving the exercise from A Tour of Go, Equivalent Binary Tree. This exercise requires one to implement a Walk function which is supposed to walk a tree and send all values orderly from the tree to a channel.

The exercise statement states:

... We'll use Go's concurrency and channels to write a simple solution.

Reading that line, I think it is challenging to implement the Walk in a way that it launches a goroutine for each left/right …

concurrency go

5
推荐指数
1
解决办法
268
查看次数

标签 统计

concurrency ×1

go ×1