Johny and Jolly are playing a game. In they have to make string S containing just the characters '(', ')', '{', '}', '[' and ']'.
Now in the end they have to check if the formed string is valid or not.
A string is valid if:
Open brackets must be closed by the same type of brackets.
Input Format
First line contains the string made of "(",")","[","]","{","}" these characters only.
Constraints
1 <= s.length <= 1000 s consists of parentheses only '()[]{}'.
Output Format
If the string is valid print "true" otherwise print "false"
PS: Don't include "" while printing the output otherwise your submission might fail.
Sample Input 0
({[(])})
Sample Output 0
true
Sample Input 1
}({)
Sample Output 1
true
using c programma.
Answers
Answered by
1
Answer:
ghuri Tumi ki jai ho in Mumbai on February
Similar questions