Turing interview question

problem solving in any language