Data Structures Lab # B-trees Solution

$35.00 $24.00

Download the code that implements  B-trees  and extend  it in the following ways:   (50 %) Using the draw tree  method  for binary  search  trees  as guide, write  a method  to display  a B-tree given a reference to its root. (50 %) Write methods  that perform the following operations: (a)  Extract the items in the…

You’ll get a: . zip file solution

 

 
Categorys:

Description

5/5 – (2 votes)

Download the code that implements  B-trees  and extend  it in the following ways:

 

  1. (50 %) Using the draw tree  method  for binary  search  trees  as guide, write  a method  to display  a B-tree given a reference to its root.
  2. (50 %) Write methods  that perform the following operations: (a)  Extract the items in the B-tree  into a sorted  array.

(b)  Return  the minimum  element in the tree at a given depth  d. (c)  Return  the maximum  element in the tree at a given depth  d. (d)  Return  the number  of nodes in the tree at a given depth  d. (e)  Print all the items in the tree at a given depth  d.

(f )  Return  the number  of nodes in the tree that are full. (g)  Return  the number  of leaves in the tree that are full.

(h)  Given a key k, return the depth  at which it is found in the tree,  of -1 if k is not in the tree. (i)  Given a key k, print all the keys that are in the same node as k.

 

As usual,  write a report  describing  your work.