Posts

Showing posts with the label Program which maintains a B-tree of order 5.

Program which maintains a B-tree of order 5.

#include #include #include #include #define MAX 4 #define MIN 2 struct btnode { int count ; int value[MAX + 1] ; struct btnode *child[MAX + 1] ; } ; struct btnode * insert ( int, struct btnode * ) ; int setval ( int, struct btnode *, int *, struct btnode ** ) ; struct btnode * search ( int, struct btnode *, int * ) ; int searchnode ( int, struct btnode *, int * ) ; void fillnode ( int, struct btnode *, struct btnode *, int ) ; void split ( int, struct btnode *, struct btnode *, int, int *, struct btnode ** ) ; struct btnode * delete ( int, struct btnode * ) ; int delhelp ( int, struct btnode * ) ; void clear ( struct btnode *, int ) ; void copysucc ( struct btnode *, int ) ; void restore ( struct btnode *, int ) ; void rightshift ( struct btnode *, int ) ; void leftshift ( struct btnode *, int ) ; void merge ( struct btnode *, int ) ; void display ( struct btnode * ) ; void main( ) { struct node *root ; root = NULL ; clrscr( ) ; root = insert ( 27, root ) ; root = insert ( ...