Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

* **PLEASE DO IT IN C++*** ***DO NOT COPY/PASTE TEXTBOOK SOLUTION*** 1. Introduction You need to create a C++ program that can find out a

image text in transcribed

image text in transcribed

image text in transcribed

***PLEASE DO IT IN C++***

***DO NOT COPY/PASTE TEXTBOOK SOLUTION***

1. Introduction You need to create a C++ program that can find out a subsequence of common characters from a list of strings. A subsequence is the combination of all common characters maintain the sequence from all the strings provided. 2. Program and input specification You will get a list of strings from an input file. Each line will be considered asa single string. You need to find out the length of the common subsequence of characters from those strings which is the longest one. Assumptions . The input file is a small plain text file; no need to handle binary files . Each input file can have maximum 4 strings. * A string can have maximum 1000 characters. . An input file may contain empty lines between strings. In this case, you will ignore the line. Character is anything in the string: letters, numbers, symbols, spaces, etc. The output should be exactly matched with the format in part 3. . 3. Input and Output The input and output files are regular text files, where each line is terminated with a Tn' character. Each line will be treated as a string. The output file will contain the length of the subsequence. Output format: "Len:+ the length of the subsequence. Note, in "Len:", there is a space after the colon (:) All records should be processed sequentially from beginning to end. Note that, input and output, all are case sensitive. Please, see examples to be clarified about the format. 5. Examples Example 1 of input and output, Input11.txt abcd321ABCD abcD123ABCd Command line: Subsequence input-input11.txt output-output11.txt Output11.txt Len: 7 // maximum length subsequence: abc2ABC is of length 7 Example 2 of input and output, Input12.txt Data Structures Using C++ Data Structures Using Java COSC 2430 is Data Structures course Data and Structures Command line: Subsequence input-input12.txt output-output12.txt Output12.txt Len: 15

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions