Let 'N' = 12, 'S' = "000001010011".
The first 3 characters "000" indicate DNA.
The subsequent 3-character sets are "001", "010", and "011".
"001" maps to 'A', "010" maps to 'C', and "011" maps to 'G' in DNA.
Therefore, the answer is "DNA: ACG".
The first line contains an integer, 'N'.
The second line contains the binary string 'S' of length 'N'.
Return a string representing the type and decoded nucleotide sequence in the format "TYPE: SEQUENCE".
You don’t need to print anything. Just implement the given function.
3 <= 'N' <= 3000
'N' is a multiple of 3.
'S' contains only '0' and '1'.
The first 3 characters of 'S' are either "000" or "111".
Subsequent 3-character sets represent valid nucleotides based on the sequence type.
Time Limit: 1 sec
Approach:
Algorithm: