4 ms·
I really love this! I saw your github repo "forest" as well. I wish there were more bundled resources or code examples like this. Not because I think everything
by Ciberth 7y ago
I really love this! I saw your github repo "forest" as well. I wish there were more bundled resources or code examples like this. Not because I think everything should be out there in the open, free to get. But more as a way of retrieving examples about (maybe complex) algorithms.
Traditional books fail me in most of the cases as I want modern techniques combined with (maybe) "old" algorithms.
I would love it if people could show me modern examples and implementations (and reasoning) about let's say things from clrs for example:
- trees (red/black, splay, B, quadtrees, k-trees
- dynamic programming
- hasing (extendible, linear)
- pairing heaps, binomial queues
- shortest distances with dijkstra, johnson, bellman-ford
- finite state machines etc
- string algorithms like boyer-moore, knuth-morris-pratt
- (...)
FYI: I had no account prior to this comment, created one just for you ;) Keep up the good work OP!
- xorz57 7y agoI am pleased to hear you like my work! I have written a Red/Black and a Splay Tree Implementation as part of the forest repository but I wasen't satisfied enough with those so I removed them. I am planning to implement more stuff in the future so stay tuned!
- Ciberth 7y agoOhn it would have been cool to have a look. I have some start questions and code from a few years back at uni but I really disliked the courses, prof and way of programming. If you would be interested I can share them to gain some insights or motivations on how to (maybe not) do it :)
- xorz57 7y agoI feel you.
- deleted 7y ago[deleted]
- jstimpfle 7y agoI've implemented a red-black tree a while ago and wrote a post about it: http://jstimpfle.de/blah/rbtree/main.html http://jstimpfle.de/blah/rbtree/main.html Technically it's been a solid implementation and the post probably contains a few helpful bits. But I overengineered the implementation by splitting in too many source files, and relying on source code generation. A much cleaner "no bullshit" version of it now lives as part of my current project: https://github.com/jstimpfle/astedit https://github.com/jstimpfle/astedit . I've also added augmentation facilities (not heavily tested). I think it's pretty good, I just might open up the internals even more than they already are. (I think the std::map approach from STL definitely has merits, especially when one needs just an associative container, quickly. But it's not a very efficient nor flexible approach.) That project also has a text rope implementation that uses the red-black tree. I think a rope is much like a B-tree, but I might be wrong. Also have a look at the linux kernel rbtree implementation. But I think it's not easily usable outside the linux tree.