Amazon Interview Question

Find compound strings in the array