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
1 There are several applications to assist you to surf through the internet, mention
prohojiy [21]
Email
Web browsing
Peer-to-peer services
3 0
3 years ago
The REPE prefix does which of the following ?a. Repeats an instruction while the zero flag is clearb. Repeats an instruction whi
lora16 [44]

Answer:

repeats an instruction while the Zero flag is set

Explanation:

hope this helps you :)

6 0
3 years ago
Read 2 more answers
You want to send an email message to your friend to describe your meeting with Michal. However, you incorrectly type the name as
Gemiola [76]

Answer:

Option B.

Explanation:

The delete key is used to delete the symbol after the insertion point.

Here, Michal is typed as Michael.

So, to delete the letter e from Michael, put the insertion point before e.

If you put insertion point after the letter e or before the letter l, l gets deleted.

In no case, you can put the insertion point after the letter l.

So, option B is correct.

4 0
3 years ago
A high school teacher conducted a test of a new approach to teaching math. Students were given a pretest when their math class b
MakcuM [25]

Answer:

It represents a threat of instrument change.

Explanation:

Internal validity is a method to determine if research has been performed properly. It is based on the number of confounding variables present in the experiment. If an experiment is carried out and confounding variables are avoided, the internal validity is high, and viceversa. In an ideal context, the experiment's internal validity will be high, which will mean its results will be trustworthy.

The students, by making use of a computer software, lowered the validity of the test performed by the teacher.

5 0
3 years ago
When was the first computer invented?
sweet [91]
The EINAC at the university of pennsylvania, completed in 1946. It weighed more than 50 tons.
4 0
3 years ago
Read 2 more answers
Other questions:
  • Suppose you're trying to remove the clamp from a ground strap that's connected to a battery. The clamp won't come loose. Which o
    14·2 answers
  • Which of the following is the final fate for average sized stars?
    12·1 answer
  • How has the use of computers impacted business
    13·2 answers
  • How should font appear in a slide presentation compared to the font in a document
    7·1 answer
  • Your network consists of a single Active Directory domain. Your company has recently merged with another company. The acquired c
    8·1 answer
  • What is the main function of processing unit​
    5·2 answers
  • On the new iOS version, can you save photos from ‘review confirmed photos’? If so, how? Thanks!
    10·1 answer
  • China's cultural diversity, China is composed of 56 ethnic groups.
    5·1 answer
  • KELLY Connect
    8·1 answer
  • The page that appears when you first open your Internet browser is the _____.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!