Question: using Structures c++ and without using build-in function pls A stack Cost: 3 Solved: 0 Memory limit: 256 Mb Time limit: 1000 ms Input file:

 using Structures c++ and without using build-in function pls A stack

using Structures c++ and without using build-in function 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!