23andMe interview question

Implement a function in C.