Frage im Vorstellungsgespräch bei Qualcomm

Write a function that checks if a string has valid parentheses