Question: write the solution to the following problem in java Problem Statement Write code to find which of the strands representing DNA in an array stringl)
Problem Statement Write code to find which of the strands representing DNA in an array stringl) strand representing strands of DNA has the most occurrences of the nucleotide represented by parameter nue. If more than one strand has the same moximal number of the specified nucleotide you should return the longest strand with the maximal number. AIl DNA strands have different lengths in this problem so the maximal strand will be unique when length is accounted for. Return this uniquely maximal strand. Each String representing a DNA strand will contain only cytosine, guanibe, thymine, and adenine, represented by the characters 'e', 'g', T ', and ' a ', respectively. If no strand in the array contains the specified nucleotide return the empty string . Constraints - strande will contain mo more than 90 elements, cach element will be a different length and the characters of the the strings will only be 'a', ' g ', ' t ', or 'C'. - nue will be a one character string, either 4a4,g4,77, or c, Examples I. stranda = ("age", "ange", "taatet, "cestg") zoe = "a: Returns: "taant" since both "aagt" and "taate" have two occurrences of 'a', but "taant" is longer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
