Open marslangoog opened 9 years ago
I'm not quite sure what to do here.
Any of the three main traversal orders can be used to complete the exercise.
The exercise does seem to suggest in-order traversal by saying "It should be the numbers 1, 2, 3, ..., 10." However, we can also relax this to say "it should be a sequence of the integers 1, 2, 3, ..., 10" so that the traversal order is left unspecified.
Leaving for others.
Similar to https://github.com/golang/go/issues/11009, I think the key here is whether the exercise expects the user to
If 2, Walk must traverse in-order.
Ahh, you're right. The New function generates a BST, so the trees must be traversed in-order so that two trees can be compared item by item from Walk.
I'm not sure what to how to best change the current text. I'm wonder if that's left as an exercise for the reader.
Context: /concurrency/8
It should be made clear that Walk function should traverse the tree in-order.