Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tour: Confusing exercise #1642

Open
Shumakriss opened this issue Aug 20, 2024 · 0 comments
Open

tour: Confusing exercise #1642

Shumakriss opened this issue Aug 20, 2024 · 0 comments

Comments

@Shumakriss
Copy link

Context: https://go.dev/tour/concurrency/8

I really like this exercise as it requires some use of most of the concepts in the tour which is fitting as one of the final exercises.

I am confused about one part though. The exercise states: "Then read and print 10 values from the channel. It should be the numbers 1, 2, 3, ..., 10."

This sets an invalid expectation for implementations of Walk that it will yield the sorted contents regardless of the tree structure. The examples given on the previous page show two trees which, if traversed using the same algorithm (preorder, in-order, post-order) will yield values out of order. This seems to be the given intention of the exercise, to detect alternate structures.

The statement should be amended so as not to give the expectation that values will be listed in numeric order so that learners can simply choose any one conventional traversal algorithm to do the comparison of structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant