Turing interview question

Both questions were Strings based