DC10005 - Editorial

DC10005 - Editorial

PROBLEM
Link to the Practice Question can be found: CodeChef: Practical coding for everyone

PREREQUISITE
DNA encoding, Cryptography

DIFFICULTY
Hard

PROBLEM
Write a program such that for a given message and a key, it generate the corresponding ciphertext as DNA sequence.

EXPLANATION

1.Get the ASCII code for each of the character from the given text-message.

  1. For each pair of binary values get the DNA sequence by replacing values as 00 = A, 01 = C, 10 = G, 11 = T. Get the DNA-sequence

  2. Encode the key using Table-1 given in the problem statement. Get the DNA-key.

  3. Use DNA-key to encrypt the DNA-sequence using Table-2.

Solution

https://drive.google.com/file/d/1iGhD5sklxtVhCPWE5Qlm3NlnZM3KwyMG/view?usp=sharing