ROSALIND|Locating Restriction Sites (REVP)
給定一條以 FASTA 儲存的 DNA 序列,求長度介於 4 到 12 之間的反向迴文(reverse palindrome)的起始位置與長度。
A DNA string is a reverse palindrome if it is equal to its reverse complement. For instance, GCATGC is a reverse palindrome because its reverse complement is GCATGC. See Figure 2.
Given: A DNA string of length at most 1 kbp in FASTA format.
Return: The position and length of every reverse palindrome in the string having length between 4 and 12. You may return these pairs in any order.