100% Guaranteed Results


Exercises – Programming assignment 10 Solved
$ 20.99
Category:

Description

5/5 – (1 vote)

Longest Common Subsequence

Input (Standard input)
In the first line, sequence A is given and in the second line, sequence B is given. Both sequences have at most 500 characters.
*You must lexicographically sort input sequences in increasing order and set bigger one to xaxis and smaller one to y-axis.
Output (Standard output)
Print the longest common subsequence.
When the number in the left entry is the same as the number in the top entry, you must select the top entry. [Example]
Input Output
abccdfecd abcdef abcde

A b c c d f e c d
0 0 0 0 0 0 0 0 0 0
a 0 1 1 1 1 1 1 1 1 1
b 0 1 2 2 2 2 2 2 2 2
c 0 1 2 3 3 3 3 3 3 3
d 0 1 2 3 3 4 4 4 4 4
e 0 1 2 3 3 4 4 5 5 5
f 0 1 2 3 3 4 5 5 5 5

Description
1. File name must be Longest_common_sequence.cpp
2. Make a comment of your student ID, name and class in the first line of the source code. ex) 2014601028_Honggildong_A
3. Please keep the source code that you have submitted for some unexpected accident.

Reviews

There are no reviews yet.

Be the first to review “Exercises – Programming assignment 10 Solved”

Your email address will not be published. Required fields are marked *

Related products