23andMe Interview Question

Implement a function in C.