Houzz Interview Question

Determine String repetition patterns?