CR2 interview question

Algorithms and complexity