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
How do most database users perform data searches?
defon

Answer:

by using forms

Explanation:

Most of the database users perform the data searches by using the forms. A form can be used to enter, edit and display the data from the data source. Its a user interface in fact that fetches the data from the database. Reports have used the display the data for a certain type of user, and the viewing table does not look feasible to search from a very large database, and the databases are usually large. No calculation is required for searching the data, and we only need to write queries in the right syntax. Hence, here the correct option is by using forms.

7 0
3 years ago
All organizations with a router at the boundary between the organization’s internal networks and the external service provider w
Anika [276]

Answer:

False

Explanation:

Access Control Lists (ACLs) are network filters used by routers and some switches to permit and restrict data flows in and out of network devices. When an ACL is implemented in a device or interface, the network device analyses data passing through it, compares it to the specification described in the ACL, and allows it the data to flow or prohibits it. One of the main reasons ACLs arre used is to provide a basic level of security for networks. If anything, the use of ACLs and their complexities bring about a delay in transmission through networks.

3 0
2 years ago
Greg works for an online games development company. He is not a net freak, but occasionally he visits online literature sites an
sweet-ann [11.9K]

Answer:

i think its A

Explanation:i hope i helped

5 0
3 years ago
How to add a while loop? here's my code
Jet001 [13]

To add while loop in python language, the use of syntax is to be brought into the effect.

<h3>What is a while loop?</h3>

A while loop can be referred to as an expression of code-blocks being true to their cores. Until the blocks of the code are not proved to be true, the loop continues.

In order to add such while loop to your code, one needs to use the syntax function in python to prove the true and correctness of the code blocks.

Hence, the procedure to add while loop has been aforementioned.

Learn more about a while loop here:

brainly.com/question/15690925

#SPJ1

3 0
2 years ago
What is an occupation?​
LiRa [457]

Answer:

a job or profession.

4 0
3 years ago
Other questions:
  • whats something that u want to do but ur parents wont allow it like having a phone or going to a college ​
    11·2 answers
  • To use a stored address, C provides us with an indirection operator, ____.
    6·1 answer
  • Suppose you are given a bag containing n unbiased coins. You are told that n − 1 of these coins are normal, with heads on one si
    7·1 answer
  • A software process describes the interrelationship among the phases by expressing their order and frequency, but does not define
    14·1 answer
  • One key criterion for selecting social networks is the number of daily visitors to the website. when comparing linkedin traffic
    7·1 answer
  • Why bootable installer preparation is important? explain
    9·1 answer
  • The small flash memory used in<br>protable device like Laptop<br><br>​
    10·1 answer
  • Question:
    14·1 answer
  • Help me please, I'm attempting a test<br>​
    12·2 answers
  • Presentations must have what to be efffective
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!