Question: -Parenthesis matching problem Algorithm Design and Analysis Using Dev-C++ Requirements: Give a legal sequence containing only left and right parentheses, output the position of each

Requirements: Give a legal sequence containing only left and right parentheses, output the position of each pair of parentheses in the order of left to right. The parenthesis sequence starts with 1. Input: 1 line of legal parenthesis sequence. Output: if there are n left parentheses in the sequence, n lines will be output.Two integers in each line represent the position numbers of the left and right of the matching parentheses
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
