DNA Encryption
CodeChefOpen on judge ↗
Alice wants to send a message $ M $= "ATTACK" to Bob through a public channel securely (using key $ K $ = “SKY”). For encoding the message $ M $, Alice wants to use DNA encryption (A=00, C=01, G=10, T=11). For generating the key in DNA format one secure table is shared between Alice and Bob (Table 1). Alice needs to use the message $ M $, key in DNA format and DNA-sequence-table (Table 2).
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start