Write a function called subsequence() that finds the longest common subsequence of two DNA strands. The function should take two DNA strands (strings) as input and should return the longest common subsequence.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter10: Application Development
Section: Chapter Questions
Problem 6VE
icon
Related questions
Question

Write a function called subsequence() that finds the longest common subsequence of two DNA strands. The function should take two DNA strands (strings) as input and should return the longest common subsequence. 
Example:
subsequence(“AATTCAT”, “CAT”) returns “CAT”
subsequence(“CAAAT”, “CAT”) returns “CA”
subsequence(“CCG”, “TTA”) returns “”
subsequence(“AATGTTACCC”, “AATCTTACCT”) returns “TTACC”
subsequence(“AATCTTAGCC”, “AATCAAAGCC”) returns “AATC”
If there are multiple subsequences of the same length, then return the first

Write a function called subsequence () that finds the longest common subsequence of two
DNA strands. The function should take two DNA strands (strings) as input and should return the
longest common subsequence.
Example:
subsequence ("AATTCAT", "CAT") retums "CAT"
subsequence ("CAAAT", "CAT") returns "CA"
subsequence ("cCG", "TTA") returns ""
subsequence ("AATGTTACCC", "AATCTTACCT") 1eluris "TTACC"
subsequence ("AATCTTAGCC", "AATCAAAGCC") returns "AATC"
If there are multiple subsequences of the same length, then return the first.
Page 6 of 6
Transcribed Image Text:Write a function called subsequence () that finds the longest common subsequence of two DNA strands. The function should take two DNA strands (strings) as input and should return the longest common subsequence. Example: subsequence ("AATTCAT", "CAT") retums "CAT" subsequence ("CAAAT", "CAT") returns "CA" subsequence ("cCG", "TTA") returns "" subsequence ("AATGTTACCC", "AATCTTACCT") 1eluris "TTACC" subsequence ("AATCTTAGCC", "AATCAAAGCC") returns "AATC" If there are multiple subsequences of the same length, then return the first. Page 6 of 6
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,