Turing interview question

Can you work me through your implementation