1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anon25 [30]
2 years ago
13

Write a Java method to delete a record from a B-tree of order n.

Computers and Technology
1 answer:
max2010maxim [7]2 years ago
6 0

Answer:

Deleting a record on a B-tree consists of three main events:

- Searching the node where the key to be deleted exists

- Deleting the key

- Balancing the tree if required

Explanation:

q = NULL;

   p = tree;

   while (p) {

       i = nodesearch(p, key);

       q = p;

       if (i < used(p) -1 && key == k(p,i)) {

           found = TRUE;

           position = i;

           break;

       }

       p = son(p,i);

   }

   if (!found)

   else if (subtree(p)) {

         if (used(p) > ((n-1)/2)+1)

         delkey (p, position, key);

       else {

           replace (p, position, fsucc(p));

           p0 r1 p1 r2 p2 r3 ……. pn-1 rn-1 pn

           q = &fsucc(p);

           qpos = index of fsucc;

           if (used(rbrother(p)) > ((n-1)/2)+1)

               replace (q, qpos, sonsucc(q));

           else

               while (q && used(q) < (n-1)/2) {

                   concatenate(q, brother(q));

                   q = father(q);

               }

       }

   }

   else

   delkey(p, position, key);

}

You might be interested in
I got enough points and enough brainliests how do I move on to my next rank?
emmasim [6.3K]

Answer: what do you mean exactly?

6 0
3 years ago
Read 2 more answers
Round 74,361 to the nearest 10​
grandymaker [24]

Answer:

74,400 i think

Explanation:

8 0
3 years ago
What would be the best thing you could do to prepare yourself to work for a company that has embraced globalization?
kvasek [131]
Learn a foreign language
4 0
2 years ago
A sosit vara.copiii sunt veseli pentru ca au luat vacanta,mii de fluturi colorati zboara pe ceruri senine,soarele straluceste ve
hodyreva [135]
Acest lucru nu este calculator și tehnologie acest lucru arata ca acesta poate fi un poem pare rău, dar acest lucru trebuie postat in categoria engleză!! Mulțumesc

4 0
2 years ago
What could be the reasons of Blue Screen of Death on Windows computers?
muminat

Answer:

The reasons for  Blue Screen Of Death are as following:-

  1. Faulty Memory.
  2. Power Supply Issue.
  3. Overheating of Components.
  4. Malfunctioning Hardwares.
  5. Poorly coded device drivers.
  6. Hardware runnign beyond it's capacity.
  7. Bugs in the Operating System Kernel.

These are the some of the reasons why the blue screen of death is caused.

6 0
3 years ago
Other questions:
  • What is the purpose of exporting your public key to the directory services server?
    11·1 answer
  • You work as the IT administrator for a small corporate network. To accommodate specific network communication needs for an upcom
    9·1 answer
  • Gabriel needs to create a formula that does not change when it is copied to cell b2. which formula should he create?
    14·1 answer
  • What video game has made the most money as of 2016?
    15·2 answers
  • Another pitfall cited in Section 1.10 is expecting to improve the overall performance of a computer by improving only one aspect
    13·1 answer
  • The design of a blog refers to:
    10·1 answer
  • Discuss, in detail, the usefulness of graphics and images in program development. Explain the importance of the interface of a c
    7·1 answer
  • After selecting a cell in the data range, what are some ways to create a table? Check all that apply.
    5·2 answers
  • This is your code. &gt;&gt;&gt; A = ['dog''red'] &gt;&gt;&gt; B = [' cat', 'blue']&gt;&gt;&gt;C = ['fish', 'green'] You can impl
    10·2 answers
  • (1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!