Writing a BST (Binary Search Tree) on the hard disk. Done as part of the course "Fine Techniques" (UE18CS257D) at PES University.
This code is used to store a BST into a file i.e. the hard disk itself, instead of the heap of the program. Offsets are used to get the position of subtrees.
init_file("<file_name>.dat")
insert_key(<key>, <file_pointer>)
delete_key(<key>, <file_pointer>)
display_inorder(<file_pointer>)
display_preorder(<file_pointer>)
Client code should contain the functions above if you want to test this code. For examples, look at tests
To compile and execute:
gcc implementation.c <client>.c -o <output_file>.out
./<output_file>.out
This will run the client code against the file which will implement the BST in the file. You can use the three client files already provided if you want to.