Fácil20 pts
Valid Parentheses
Traducción al español en progresoEl contenido detallado de esta lección aún se está traduciendo. Mientras tanto, se muestra en inglés.
Given a string containing only '(', ')', '{', '}', '[' and ']', determine if the input string is valid. A string is valid if: 1. Open brackets must be closed by the same type of brackets. 2. Open brackets must be closed in the correct order. 3. Every close bracket has a corresponding open bracket of the same type. Example: '([{}])' → valid, '([)]' → invalid, '((()' → invalid
Entrada
A single line containing the bracket string.
Salida
'true' if valid, 'false' otherwise.
Ejemplo
([{}])Esperado
true
Loading editor…
Resultado
Sin salida aún. Ejecuta tu código para ver resultados.