Repeated DNA Sequences

Medium · Hashing · about 15 minutes

Asked at LinkedIn, Amazon, Bloomberg, Google, Meta.

A DNA sequence is a string of 'A', 'C', 'G' and 'T'. Return every 10-letter substring that occurs more than once in s, in any order (each listed once).

Related guides