Question d’entretien chez Apple

Design the algorithm of grep