In the DNA double helix, two strands twist together and "face" each other. The two strands are reverse-complementary, i.e., reading one strand in reverse order and exchanging each base with its complement gives the other strand. A and T are complementary; C and G are complementary. For example, given the DNA sequence
AGTAGCAT
the reverse sequence is
TACGATGA
so the reverse complement is
ATGCTACT
Writ a function rComplement(dna) to return the reverse complement of a DNA strand. Use a loop to reverse the strand-do not use vectorized code. dna is a char vector. Assume that dna contains only the letters 'A', 'T', 'C', and 'G'. If dna is the empty vector return the empty char vector.
Do not use any built-in function other than length.