Find Frequent DNA Subsequences
Find Frequent DNA Subsequences
EasyStrings0% accepted
Dr. Ravi's genomics lab in Bangalore analyzes DNA sequences to identify genetic markers. He needs to find the most frequently occurring 2-character DNA subsequence in a given sequence to determine gene patterns.
Approach
Given a DNA sequence string, find the most frequent 2-character substring (return first occurrence if tied).
Input
AGTACG
Output
AG
More Strings problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards