WisdmLabs interview question

Pattern program string occurrence code