Question: Question 5 : Lazy String Problem Statement: Anish is the laziest person you can ever see. He is tasked to wrhe the name of the

Question 5: Lazy String
Problem Statement:
Anish is the laziest person you can ever see. He is tasked to wrhe the name of the winner in a game where two people take part. And he just writes the longest common subsequence over there, so that with minimum chane or no backspace he can edit the name to the winner's name.
For two given names, you have to predict what Anish will write in his computer before the start of the name. If there are more than two longest subsequences possible,write the one with less lexicographic value.
Input Format:
Two lines including two strings of name(All with capital letters)
Output Format:
A single line with the lexicographically smallest possible longest common subsequence.
 Question 5: Lazy String Problem Statement: Anish is the laziest person

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!