athenahealth interview question

A coding question with some algorithm Basic OOD question