in reply to string complement question

From what you've described, your code does what you want. I.e., the string "gttcgaac" matches because if you compliment it and reverse it you get "gttcgaac" which means that the original string is its own reversed compliment.

        gttcgaac
        caagcttg
Now, if you want to find other occurences of the reversed compliment within the array, you'll have to cache all of the reversed compliments somewhere and then do equality comparisons against each element of the array.

Or did you mean something different?