Question: algorithm using non-programming languages please The distance between two patterns is given by the number of nucleotides from the last nucleotide of the first string
algorithm using non-programming languages please
The distance between two patterns is given by the number of nucleotides from the last nucleotide of the first string to the first nucleotide of the second string. Write an algorithm the calculates the distance between two patterns in a sequence. Note: You can assume there is only one instance of pattern1 and pattern2 exist in the input sequence. Example: Inputs: text = "ACGTAGAACTG", pattern1 = "CG", pattern2 = "CT" Output: 5 (the length of underlined sequence)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
