I\'m trying to understand how I should think about getting the k-th key/element in a B-tree. Even if it\'s steps instead of code, it will still help a lot. Thanks
You can use a new balanced binary search tree(like Splay or just using std::set) to record what elements are currently in the B-Tree. This will allow every operation to finish in O(logn), and its quite easy to implement(when using std::set) but will double the space cost.