Significance:
Type II restriction enzymes (like EcoRI, which cuts `GAATTC`) almost always recognize **reverse-complement palindromes** — sequences that read the same on both strands when read 5'→3'. This property is exactly why they can cut double-stranded DNA symmetrically, and it's the foundation of classical molecular cloning and CRISPR guide-design tools that must avoid or exploit these sites.
Statement
A DNA string is a **reverse-complement palindrome** if it is equal to its own reverse complement. Given a DNA string, output `True` if it is such a palindrome, and `False` otherwise. (Note: this is a different, biology-specific notion of "palindrome" than a string reading the same forwards and backwards — do not simply reverse the string.)
Sample Input
GAATTC
Sample Output
True
Constraints
- `1 ≤ length(DNA) ≤ 200`, and length will always be even (real restriction sites are even-length so they can align across both strands)
My Notes
Log in to save personal notes.
Console output will appear here when you click Run Code or Submit...