Environmental Sciences, asked by anushaspark, 6 months ago

have the function check brackets take the str parameter being passed and return true value if the curly brackets are correctly matched using pointers​

Answers

Answered by AJS2k20
0

Answer:

Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp.

Example:  

Input: exp = “[()]{}{[()()]()}”  

Output: Balanced

Input: exp = “[(])”  

Output: Not Balanced

Plz verify on google if not

Answered by karmakarsangita38
0

Answer:

Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp.

Example:

Input: exp = “[()]{}{[()()]()}”

Output: Balanced

Input: exp = “[(])”

Output: Not Balanced ....

pls mark me as brainlist ✨✨

Similar questions