Question: using c++ and (structures) without using library pls A stack Cost: 3 Solved: 0 Memory limit: 256 Mb Time limit: 1000 ms Input file: stdin

using c++ and (structures) without using library pls
A stack Cost: 3 Solved: 0 Memory limit: 256 Mb Time limit: 1000 ms Input file: stdin Output file: stdout Task: You are given a string s consisting of different opening and closing brackets (),[), >, {}. You have to check whether or not the string a regular brackets sequence. A sequence is considered regular if the next rules are followed: 1) An empty sequence is a regular sequence. 2) If s is a regular sequence, then (s), [s], , {s} are regular sequences. 3) If A and B are regular sequences, then AB is a regular sequence. Input: The string s consisting of different brackets. Output: Write 1 if the sequence is regular and O if not. Example: Input Output ( 0 [{}() 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
