Question: Write two C++ functions. 1. void Array::cleave(const std::string & target) {} Remove from current array the sequence between the end of the first occurrence of

Write two C++ functions. 1. void Array::cleave(const std::string & target) {}

Remove from current array the sequence between the end of the first occurrence of a passed target sequence through the end of the second occurence of the target sequence

For example,

pre: Array e.g. ACTTGACCTTGA and target e.g. "TTG"
post: ACTTGA (ACCTTG removed)
 2. void Array::cleaveAll (const std::string & target) {}

Remove from current array the sequence between pairs of target sequence

For example,

pre: Array e.g. ACTTGATTGGGTTGCTTGCC and target e.g. "TTG"
post: ACTTGGGTTGCC (ATTG and CTTG removed)

Requirements: The array should be a character array instead of a cstring. Please don't turn it into a string object and directly manipulate the character array.

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!