Open mvuksano opened 4 years ago
Seems like a duplicate of https://github.com/golang/tour/issues/403#issuecomment-401782939. What do you think?
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.
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.