Pyramid Interview Question

Writing a small function that will loop to find a word in a string