Pregunta de entrevista de Philips

Implement function verify(text) which verifies whether parentheses within text are correctly nested. You need to consider three kinds (),{},<>