Student search engine
A C program that stores student records as fixed-width rows in a flat file and searches them two ways: hash map with chaining for O(1)-ish SRN lookup, and a binary search tree for ordered prefix search by name, reading record bytes back from disk by computed offset.
The brief
First-year systems fundamentals, done properly. Student records (SRN, name, SGPA and a few more fields) are written as fixed 155-byte rows into a flat file. The search program builds two in-memory indexes over that file: a hash map keyed on SRN, bucketed by the numeric tail of the ID with separate chaining for collisions, and a binary search tree keyed on name. A small REPL routes queries: an SRN goes straight to its hash bucket; anything else runs an in-order BST traversal doing prefix matching, so all hits print alphabetically.
The detail that makes it systems work rather than a data-structures worksheet:
matches are not held in memory. Each hit seeks back into the file by computed
offset (record number × record size) and reads the actual bytes off disk.
Why it earns a place
Pick the structure for the query: hashing for exact-key lookup, an ordered tree for prefix scans, both over the same data. Plus hand-rolled collision handling and offset arithmetic in C, in second year. The README honestly says “not final version,” and the hash function has a divide-by-zero waiting on an empty file. It stays in the registry as the earliest evidence of the fundamentals everything else here is built on.
Credit
Semester-2 team build.