Search code examples
algorithmb-treearray-algorithms

Finding Minimum Key and Predecessor in B-Tree


Explain how to find the minimum key stored in a B-tree and how to find the predecessor of a given key stored in a B-tree.


Solution

  • You can write recursive function to traverse a B-tree (from the root) via left and right nodes of each parent node. During this you can compare all values and find minimum and its parent node.