3 ms·
I don't know, wouldn't dumping the data into a db easier? If it fits on sqlite, you already have a solution in most languages to this problem. Technically you
by BiteCode_dev 6y ago
I don't know, wouldn't dumping the data into a db easier? If it fits on sqlite, you already have a solution in most languages to this problem.
Technically you would be using a btree, but a higher level interface, like with a fs or hashmap. Which is kinda my point.
I dont say it's not a good DS, but having it in all languages stdlib seems overkill given the tool we have today.
I'm a python guy, and even without panda it has the heapq module which is a b-tree, yet I never really got a reason to use it.
- fnord123 6y agoHeapq is a priority queue implemented on a binary tree; not a btree. > I dont say it's not a good DS, but having it in all languages stdlib seems overkill given the tool we have today. C++ has map and Java has TreeMap. These are both red black trees (which are equivalent to btrees where k=4). So there's no question of whether there are ordered mapping types in these languages. IMO they'd be better as b(+)rees with a wider fanout. That's all.