Sailthru interview question

Simple algorithm problem