Computer Science, asked by mukeshsahh83, 7 months ago

what is parentheses checker?why it is needed?​

Answers

Answered by Anonymous
0

Answer:

\huge\underline\bold\red{ANSWER}

Declare a character stack S. ... If the current character is a starting bracket ('(' or '{' or '[') then push it to stack. If the current character is a closing bracket (')' or '}' or ']') then pop from stack and if the popped character is the matching starting bracket then fine else parenthesis are not balanced.

Similar questions