bpfind.cpp

来自「经典c++程序的实现」· C++ 代码 · 共 14 行

CPP
14
字号
// B+-tree pseudocode: find// function binaryle(A, n, K) returns the greatest value less than//   or equal to K in array A of length n.Record* BP::findhelp(BPNode* root, const KEY K) {  int currec = binaryle(root->recarray, root->numrec, K);  if (root->isLeaf())    if (root->recarray[currec].key == K)      return root->recarray[currec].pointer;    else return NULL;  else findhelp(root->recarray[currec].pointer, K);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?