interview question to split block of text into lines