Given a string consisting of the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
A string is considered valid if:
You need to implement a function that takes a string as input and returns a boolean value indicating whether the string is valid.
A single string:
s = input string containing only the characters '(', ')', '{', '}', '[' and ']'
Return true if the string is valid, otherwise return false.
Input: s = "()"
Output: true
Input: s = "()[]{}"
Output: true
Input: s = "(]"
Output: false
Input: s = "([)]"
Output: false
Input: s = "{[]}"
Output: true
No constraints provided