#58·algs4

BTree issues

Author: heniotierraCreated Aug 29, 2018Updated Aug 29, 2018

Hi,

I think I have found a few problems with the BTree implementation.

  1. Not sure if this is really a problem, but the same key can be inserted multiple times;

  2. If the same key is inserted more than M-1 times, there will be a split, and only the M/2 keys of the new node will be accessible, while the other ones will be forever inaccessible;

  3. When a slipt occurs, the old node keeps the keys that were sent to the new node, even though they now inaccessible in that node; again, this may not be a problem;

  4. When a key is removed, the method still increments the size counter, instead of decreasing it;

Since I am using the this BTree implementation, I have fixed these problems on my side.