Turing interview question

Algorthmic problem and time complexity problem