Significance:
Eukaryotic genes are interrupted by non-coding introns that must be spliced out of the pre-mRNA before translation — a process central to eukaryotic gene expression and the reason a single gene can produce multiple protein isoforms via alternative splicing. Simulating splicing forces you to combine string removal, transcription, and translation into a single realistic pipeline — a preview of real gene-annotation software.
Statement
Given a DNA string representing a gene, and a collection of substrings representing its introns, remove **every occurrence** of each intron from the DNA (introns will each appear exactly once in the given DNA), concatenate the remaining exons in their original order, transcribe the result into RNA, and translate it into a protein string (stopping at the first stop codon, as in Problem 8).
- `1 ≤ length(DNA) ≤ 1000` - Introns are given as a list of substrings, each guaranteed to appear exactly once in the DNA - The spliced (exon-only) DNA length is guaranteed to be divisible by 3
My Notes
Log in to save personal notes.
Console output will appear here when you click Run Code or Submit...