What exactly is stored in a leaf node of a B-tree?
💡 Model Answer
In a B‑tree (or B+ tree) the leaf nodes hold the actual key values that are used for searching, along with pointers to the data records (or row identifiers). In a B+ tree, the leaf nodes also contain the full data records or a reference to them, and they are linked together in a doubly‑linked list to support efficient range scans. The internal nodes only contain keys and child pointers; they do not store data records. Thus, the leaf node is the place where the data is physically stored or referenced, and it is the node that is returned when a search reaches the bottom of the tree.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.
Get Assisting AI — Starts at ₹500