Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Find regular bracket subsequences, ignoring any other characters Cost: 8 | Solved: 0 Memory limit: 2 5 6 Mb Time limit: 1 0 0 0

Find regular bracket subsequences, ignoring any other characters
Cost: 8| Solved: 0
Memory limit: 256 Mb
Time limit: 1000 ms
Input file: stdin
Output file: stdout Task:
You are given a set of strings separated with line feed characters.
Find all their regular bracket subsequences.
A regular bracket sequence is a bracket sequence defined by the following rules:
(an empty string) is a regular bracket sequence;
Let S be a regular bracket sequence, then (S) and {S} are also regular bracket sequences;
Let S1 and S2 be regular bracket sequences, then S1S2 is also a regular bracket sequence;
Now the strings can contain some other characters besides curly and round brackets, but the regular bracket subsequences can not start or end with them.
Input:
A set of strings separated with line feed characters.
Output:
All the longest correct substrings in the order in which they appear in the text, separating each with a line feed character.
** Use only C++**
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

Students also viewed these Databases questions