Is Special Sequence
Problem Overview
- Decide if a DNA string can be split into two non-empty parts so that each part, after removing at most one character, can be rearranged into a palindrome.
- Input: lowercase dna_sequence (length 1–300000). Output: "YES" or "NO".
- Real-world context: genome sequencing utility that detects palindromic patterns in DNA.
- Asked in Amazon interviews; a coding interview problem and interview question on strings.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
