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
Coloumn1; Criteria1: Average of best three marks (CA); CA&gt;=40
Nikitich [7]

Answer:

Please check the attachment.

for the assembly language program the jump and move keywords have been used to establish the if else ladder.

Also for the best three marks, we need to store the three theory and two practical marks in an array, and then we can sort it to get the best three marks to find the CA. and then from initial array, we can find the last two practical test parks, and find their average.

Rest of the calculation is as being mentioned in the image. Also, in the image we have 2 practicals. We need to count two instead of three there, and rest is as shown.

Explanation:

The answer does not require any further explanation.

5 0
3 years ago
Aisha designed a web site for her school FBLA club and tested it to see how well it would resize on different systems and device
VARVARA [1.3K]

Answer: responsive

Explanation:

its called mobile responsivness and most good websites have it

5 0
1 year ago
Given a scanner reference variable named input that has been associated with an input source consisting of a sequence of strings
Makovka662 [10]

The code that examines all the strings in the input source and determines how long the longest string (or strings are) is the following:

total = 0; % initial value is zero, in every while loop it will be incremented

while(input.hasNextInt()){

total += input.nextInt( );

}

7 0
2 years ago
Read 2 more answers
It takes you 0.8 of a minute to read each page of your health book. It takes you 5.5 minutes to take the test at the end. How lo
NeTakaya
The answer would be 13.3125 because 6.25 / 0.8 is 7.8125 than add 5.5 which will equal 13.3125. I'm sure about this.
7 0
2 years ago
Read 2 more answers
What do students buy when they pay tuition?
Marizza181 [45]

Answer:

the right to attend classes at a school

Explanation:

This question seeks to address why we go to school. We go to school to study and get certificates of qualification. To study, we have to pay tuition fees. Tuition fees constituent fifty percent of a school’s income, and without it, you will not be able to get into a classroom in the first place. It covers almost 70% of what the student does in school and this to study in a class. It pays for all academics and research, the library, teaching support, and many more. A place to live at a school and transportation expenses are probably not included in tuition fees. These are other expenses that a student requires to survive.

4 0
3 years ago
Read 2 more answers
Other questions:
  • What are the differences between levels 1, 2 and 3 cache memoroes??
    8·1 answer
  • Background Susan finished work on system architecture issues, and her system design specification was approved. Now she is ready
    15·1 answer
  • How to remove a channel from favorite list on suddenlink?
    15·1 answer
  • true or false manual handling of materials accounts for the primary source of energy in the workplace
    13·2 answers
  • What organization is responsible for the registration of Internet domain names?
    14·1 answer
  • Provide examples of the cost of quality based on your own experiences
    14·1 answer
  • True or False: When you share something on a friend’s Timeline, only that friend can see it.
    5·2 answers
  • How Can I add a image in an HTML program?​ please tell
    6·1 answer
  • Which of the following is constantly changing and advancing?
    11·1 answer
  • Como se llaman las herramientas y maquinas pque utilizan para hacer cosas artesanales
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!