DNA encoding. Develop a class DNA that supports an efficient representation of strings that are composed exclusively of A, T, C, or G characters. Include a constructor that converts a string to the internal representation, a toString() method that converts the internal representation to a string, a charAt() method that returns the character at the specified index, and an indexOf() method that takes a String pattern as an argument and returns the first occurrence of pattern in the represented string. For the internal representation, use an array of int values, packing 16 characters in each int (two bits per character).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here