Lumen interview question

write code on pattern and on strings