tour icon indicating copy to clipboard operation
tour copied to clipboard

tree: document sorted nature of random trees

Open crisman opened this issue 1 year ago • 1 comments

For the use that the tour makes of "golang.org/x/tour/tree" it is important that the generated trees are sorted. While New() does generate sorted trees it is current documented as "returns a new, random binary tree" and many readers will assume "random" implies "non-sorted".

Update doc that trees are "randomly-structured, sorted" to clarify what is random and that trees are sorted.

crisman avatar Mar 21 '23 22:03 crisman

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

Please visit https://go-review.googlesource.com/c/tour/+/478315 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

gopherbot avatar Mar 21 '23 22:03 gopherbot