← All problemsSign in

Complementary Strand in a DNA

CodeChefRating 660Open on judge ↗

You are given the sequence of Nucleotides of one strand of DNA through a string $S$ of length $N$. $S$ contains the character $A, T, C,$ and $G$ only. Chef knows that: - $A$ is complementary to $T$. - $T$ is complementary to $A$. - $C$ is complementary to $G$. - $G$ is complementary to $C$. Using the string $S$, determine the sequence of the complementary strand of the DNA. ### Input - First li

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start