🚩Palindrome detection
Use of step size
Last updated
Use of step size
Last updated
There are some palindrome sequences in DNA, such as "ATGCGCGTAATGCGCGTA"
This sequence is symmetric from a certain position in the middle, and we call this sequence a palindrome sequence. So how to detect palindrome sequence?
Look at the following program:
If this sequence is a palindrome sequence, then it will return True, if not, it will return False.
The string is reversed by changing the string step length to -1, and then it is judged whether it is the same as the previous string to distinguish the palindrome sequence.
Start time of this page: December 20, 2021
Completion time of this page: December 20, 2021