Company: IBM
Difficulty: medium
DNA/RNA Sequence Decoder Dioxyribonucleic Acid (DNA) and Ribonucleic Acid are long molecules forming the genetics and is copied over the generations. One of the components of DNA/RNA is a nucleotide which has nucleobases: Cytosine (C) Guanine (G) Adenine (A) Thymine (T) (Occurs in DNA only instead of Uracil (U)) Uracil (U) (Occurs in RNA only instead of Thymine (T)) Combination of these nucleobases form a DNA/RNA. Consider this table for solving the problem below: Nucleobase C G A T U Binary Value 001 010 011 101 110 Additionally, the sequence 000 is used to identify DNA and 111 identifies RNA. Function Description void decodeSequence(string binaryString); The function accepts STRING binaryString as parameter. Input Format A binary string containing sequences of 3 bits each. Output Format The decoded DNA or RNA sequence using the corresponding nucleobases. Constraints The input string length is a multiple of 3 The input string contains only \'0\' and \'1\' characters The first three bi