3 ms·
I can write btrees, radix trees etc but I cannot always solve problems on a white board. I'd rather take a problem home and work on it. I'm against whiteboard
by samsquire 5y ago
I can write btrees, radix trees etc but I cannot always solve problems on a white board. I'd rather take a problem home and work on it.
I'm against whiteboard interviews
- LorenPechtel 5y agoI've been writing code for 40 years (admittedly, not all of that time was writing it professionally), you say "btree" which to me could be a binary tree (which I've dealt with in the distant past but not for a long time) or balanced tree, something I've read about but never had the slightest reason to implement. I can't even recall ever hearing of a radix tree. You go dig up the specialized stuff when you need it, it's not common enough to be worth learning in general. What's important is enough foundation to understand the answer when you look it up.
- samsquire 5y agoI am interested in database internals. Btrees come up with regard to designing database systems that are efficient to query on disk. Postgres uses them for its indexes. Radix trees are memory efficient tries which are useful for answering prefix queries. They're also called prefix trees. I use them to get a list of prefixes of a string. Useful for simple intellisense style forms or dynamodb style querying. I've also been studying LSM trees which are used in Leveldb and RocksDB. I experiment with database technology in my experimental project hash-db https://github.com/samsquire/hash-db https://github.com/samsquire/hash-db The code should be readable. I need to change my search tree to be self balancing currently it grows to the left or right without balancing. I think I need to use tree rotation depending on which branch has the highest height.
- LorenPechtel 5y agoYeah, but how many programmers write database engines? That's mostly a don't-reinvent-the-wheel thing.