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]
3 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]3 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
Jackson is teaching the decimal number system. He wants his students to know how to expand numbers by powers of 10. Which is the
yarga [219]
B. One, Hundred, Ten, Thousand
4 0
3 years ago
Read 2 more answers
____ are the device drivers that provide the interface to I/O hardware.
Svetradugi [14.3K]
"Special Files" are the device drivers that provide the interface to I/O hardware.
4 0
4 years ago
16. The Nintendo Entertainment System (NES) saw its sales skyrocket as a result of the launch of which of the following games?
seropon [69]

Answer:

Super Mario bros

Explanation:

4 0
3 years ago
What is the binary for O?​
nevsk [136]

Answer:

01001111

Explanation:

8 0
3 years ago
Read 2 more answers
For every $1 of deposits, the banks can increase ________________ by the value of the Money Multiplier.
Snowcat [4.5K]
<span>A. Aggregate Price Level</span>
8 0
3 years ago
Other questions:
  • Hailey is preparing a questionnaire on the different number systems. He asks the students to write down the correct decimal and
    7·2 answers
  • If a suspect is not read his or her Miranda rights, then nothing the suspect says can be used at trial, even if the suspect volu
    11·1 answer
  • Double[][] vals =
    8·1 answer
  • While saving her word-processed academic documents, Ashley includes the subject, title, and the author's name in the properties.
    7·1 answer
  • A successful web-based strategy that helps a business spread the word about its website and products is called:
    15·1 answer
  • Question #2
    11·1 answer
  • An analogue sensor has a bandwidth which extends from very low frequencies up to a maximum of 14.5 kHz. Using the Sampling Theor
    9·2 answers
  • 7.3.4: Find the Error
    7·1 answer
  • What is a phone made out of dna
    15·1 answer
  • There are three groups of people, people who like Apples, Bananas, and Cherries. 19 people like Apples. 23 people like Bananas.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!