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: let reader know Walk should send in order #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crisman
Copy link
Contributor

@crisman crisman commented Feb 28, 2023

In "Exercise: Equivalent Binary Trees" neither the slide text nor the code state Walk() should send the values in order. Doing so in order makes using the output much more useful in Same(), but might not be easy to see for readers that have not had a data structures class. In order traversal is implied by reference with the binary tree being "always sorted" and the output defined as "should be the numbers 1, 2, 3, ..., 10."

Update the slide text to say what Walk() does. Change Walk() comments in code/solution to match.

Fixes golang/tour#158

In "Exercise: Equivalent Binary Trees" neither the slide text nor the
code state Walk() should send the values in order. Doing so in order
makes using the output much more useful in Same(), but might not be easy
to see for readers that have not had a data structures class. In order
traversal is implied by reference with the binary tree being "always
sorted" and the output defined as "should be the numbers 1, 2, 3, ...,
10."

Update the slide text to say what Walk() does. Change Walk() comments in
code/solution to match.

Fixes golang/tour#158
@gopherbot
Copy link
Contributor

This PR (HEAD: e1db6b5) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/website/+/472315 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

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

Successfully merging this pull request may close these issues.

tour: No information whether BST tree should be in/post/pre-order
2 participants