3 ms·
Gray code is beautiful. If you like numbering systems, you should read the book `Purely functional datastructures' by Chris Okasaki. The book has nice chapter
by eru 17y ago
Gray code is beautiful.
If you like numbering systems, you should read the book `Purely functional datastructures' by Chris Okasaki. The book has nice chapters on the link between number systems and data structures.
Or see the lecture on Skew Binary Numbers (http://www.cl.cam.ac.uk/teaching/2004/IntroFuncProg/lecture08.html http://www.cl.cam.ac.uk/teaching/2004/IntroFuncProg/lecture0...) to get tho flavour.
(The PhD thesis on which it is based is available at http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf)
- wgj 17y agoI'll check it out, thanks.