Starting from:

$30

COM2067 LAB 9 -Solved

Write a C program that places the given integer values in a 4th-order left-biased B tree. The number of values is not known in advance. Your program will display the structure of the tree using the output format provided. (Assume for this homework study, values are distinct).

Input: 

1

2

3

4

5

6

7

8

9

10

11

12

13

-1

Your program should print the B tree in level-order as follows (Separate the nodes with commas. Specify the values in the node with '-').
Output: 

4

2, 6-8-10   

1, 3,  5, 7,  9, 11-12-13  

More products