cs3110 / textbook

The CS 3110 Textbook, "OCaml Programming: Correct + Efficient + Beautiful"
Other
740 stars 134 forks source link

Required background on AVL trees and 2-3 trees? #139

Closed cionx closed 10 months ago

cionx commented 1 year ago

Exercise “standard library set” is as follows:

https://github.com/cs3110/textbook/blob/7b131977bcd587151bd700cd38ae83e72748a7fd/src/chapters/ds/exercises.md?plain=1#L240-L242

But the textbook only introduces red-black trees. More specifically, the following is everything that the textbook has to say about 2-3 trees and AVL trees:

https://github.com/cs3110/textbook/blob/7b131977bcd587151bd700cd38ae83e72748a7fd/src/chapters/ds/rb.md?plain=1#L93-L101

https://github.com/cs3110/textbook/blob/7b131977bcd587151bd700cd38ae83e72748a7fd/src/chapters/ds/rb.md?plain=1#L302-L306

Is the reader assumed to already know about 2-3 trees and AVL trees from another source (e.g., another course)? Also, is it intended that the answer to the exercise has essentially been given in the main text?

clarksmr commented 10 months ago

Thank you!

I think this stems from a time several years ago when CS 3110 had an extensive assignment on 2-3 trees, so students would have been expected to know them from another source than the textbook. I agree that it's not a great exercise given what's actually in the textbook. I'll redact the exercise.