Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use C++ language There is no gene for the human spirit. - Tagline for the 1997 film GATTACA The genetic code for all living organisms
use C++ language
There is no gene for the human spirit. - Tagline for the 1997 film GATTACA The genetic code for all living organisms is carried in its DNA-a molecule with the remarkable capacity to replicate its own structure. The DNA molecule itself consists of a long strand of chemical bases wound together with a similar strand in a double helix. DNA's ability to replicate comes from the fact that its four constituent bases-adenosine, cytosine, guanine, and thymine-combine with each other only in the following ways: Cytosine on one strand links only with guanine on the other, and vice versa Adenosine links only with thymine, and vice versa. Biologists abbreviate the names of the bases by writing only the initial letter: A, C, G, or T. Inside the cell, a DNA strand acts as a template to which other DNA strands can attach themselves. As an example, suppose that you have the following DNA strand, in which the position of each base has been numbered as it would be in a C++ string: T A A G G T A G T 0 1 2 3 4 5 6 7 8 9 10 11 Your mission in this exercise is to determine where a shorter DNA strand can attach itself to the longer one. If, for example, you were trying to find a match for the strand T T G the rules for DNA dictate that this strand can bind to the longer one only at position 1: T T A G C G T A T A G T 1 1 0 1 2 3 4 5 6 7 8 9 10 11 By contrast, the strand T G C matches at either position 2 or position 7. Write a function int findDNAMatch (string sl, string s2, int start = 0 ); that returns the first position at which the DNA strand sl can attach to the strand s2. As in the find method for the string class, the optional start parameter indicates the index position at which the search should start. If there is no match, findDNAMatch should return -1. Requirments & Hints: Please fill in the TODO part of Find DNAMatch.cpp. 1 /* C.../ 4 5 #includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started