In what order should you insert a set of known keys into a B-Tree to get minimal height?
问题 Given a fixed number of keys or values(stored either in array or in some data structure) and order of b-tree, can we determine the sequence of inserting keys that would generate a space efficient b-tree. To illustrate, consider b-tree of order 3. Let the keys be {1,2,3,4,5,6,7}. Inserting elements into tree in the following order for(int i=1 ;i<8; ++i) { tree.push(i); } would create a tree like this 4 2 6 1 3 5 7 see http://en.wikipedia.org/wiki/B-tree But inserting elements in this way flag