Detect Pattern of Length M Repeated K or More Times

Detect Pattern of Length M Repeated K or More Times - Coding Problem | K5kC