Closed Ankit152 closed 3 years ago
Given an expression string x. Examine whether the pairs and the orders of “{“,”}”,”(“,”)”,”[“,”]” are correct in exp. For example, the function should return 'true' for exp = “[()]{}{[()()]()}” and 'false' for exp = “[(])”.
Input: {([])} Output: true
Hi, Please assign this issue to me. I will solve this in O(n) using stack data structure. @Ankit152
Regards, Debanjan Poddar
Given an expression string x. Examine whether the pairs and the orders of “{“,”}”,”(“,”)”,”[“,”]” are correct in exp. For example, the function should return 'true' for exp = “[()]{}{[()()]()}” and 'false' for exp = “[(])”.
Input: {([])} Output: true