Yahoo interview question

Algorithms