Question d’entretien chez Thought Machine

One string parsing algorithms question of medium difficulty.