...

/

Repeated DNA Sequences

Repeated DNA Sequences

Try to solve the Repeated DNA Sequences problem.

Statement

Given a string, dna, that represents a DNA subsequence, and a number kk, return all the contiguous subsequences (substrings) of length kk that occur more than once in the string. The order of the returned subsequences does not matter. If no repeated substring is found, the function should return an empty set.

The DNA sequence is composed of a series of nucleotides abbreviated as AA ...

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy