Quantcast
Channel: Programmers Heaven Forums RSS Feed
Viewing all articles
Browse latest Browse all 2703

B-Tree - predecessor/minimum key

$
0
0
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.

This is what I have so far, but I have no idea if I am even correct:

Finding the minimum key stored in a B-tree is quite simple, we just do the opposite of find the maximum and that would be by finding the left most leaf / subtree for the given root. Once, we find the left most leaf / subtree of the give root the smallest element in the node would be the minimum key.
Finding the predecessor first we would have to find the maximum


Viewing all articles
Browse latest Browse all 2703

Trending Articles