## Check if Arithmetic Expression contains duplicate parenthesis

Objective: Given an arithmetic expression, write an algorithm to find out whether the expression contains duplicate parenthesis. Duplicate Parenthesis: Two contiguous parentheses with no elements between them can be called as duplicate parenthesis. Example: Input: A/(B+C)*D Output: No duplicate parenthesis found. Input: A/(B+C)*D/((E+F)) Output: duplicate parenthesis found Approach: Use Stack Iterate the given expression from … Read more Check if Arithmetic Expression contains duplicate parenthesis