Hard
A protein is translated from an RNA sequence based on a series of codons, each consisting of three nucleotides. The RNA codon table is used to map the RNA codon to its corresponding amino acid.
Given: An RNA string P
of length at most 10,000 nucleotides.
Return: The protein string translated from P
using the RNA codon table. Stop codons should terminate the translation.
Sample Input:
AUGGCCAUGGCGCCCAGAACUGAGAUCAAUAGUACCCGUAUUAACGGGUGA
Sample Output:
MAMAPRTEINSTRING