tour icon indicating copy to clipboard operation
tour copied to clipboard

[tour] Equivalent Binary Trees exercise uses Binary Search Tree (BST).

Open mvuksano opened this issue 5 years ago • 2 comments

In the exercise "Equivalent Binary Trees" binary search trees (BST) are used but text uses term "binary tree". I suggest using binary search tree term instead of binary tree as it implies that nodes are inserted according to a rule (lesser elements go to the left). Technically speaking two binary trees that are not sorted and contain same elements will not necessarily return elements in order using "in order traversal" (left node, current node, right node). This technique will only work on binary search trees.

mvuksano avatar Nov 11 '20 19:11 mvuksano

Seems like a duplicate of https://github.com/golang/tour/issues/403#issuecomment-401782939. What do you think?

snugghash avatar Sep 29 '21 02:09 snugghash

As a person with CS background, I can quickly get what it meant:

[1, 1, 2, 3, 5, 8, 13]. Yeah, of course, it's the result of an in-order tree walk for both structures!

But for someone not so familiar to things like the properties of binary search tree, the different kinds of tree traversals, it might be confusing since there are no keywords related to "binary search tree" mentioned on that page for them to google up.

davidhcefx avatar Apr 17 '23 17:04 davidhcefx