Amazon interview question

Find compound strings in the array