Lumen Interview Question

write code on pattern and on strings