Yahoo interview question

Problem-solving, Algorithm, data structures