1. Find key k in Tree T:
B-TREE-SEARCH(x, k){
    int i = 1;
    while (i <= n[x] && k > keyi[x] )
        i++;
    if (i <= n[x] && k == keyi[x])          return (x, i);      else{          if (leaf[x])
            return NIL;
        else
            return (ci[x], k);
    }
}
2. Insert a node in Tree T;
3. Delete a node in Tree T;
I need to follow my heart.
No comments:
Post a Comment