Loading the code workspace…
Write a C program that serializes and deserializes B-tree nodes to fixed-size pages.
Requirements:
Replacing in-memory pointers with page IDs is precisely how SQLite, PostgreSQL, and filesystem B-trees like btrfs persist a tree across process restarts — a pointer is meaningless once the program exits, but a page number written to disk is not. This page-ID indirection is also what lets a buffer pool cache and evict pages independently of the tree's logical structure.