strand of the letters A, C, G and T.
Find every segment of length exactly 10 (a substring of 10 consecutive letters) that occurs in strand more than once. Occurrences may overlap. List each such segment once; the order of the segments in the answer does not matter.strand="GATTACAGATTACAGAT" → ['GATTACAGAT']
The fragment GATTACAGAT starts at positions 0 and 7. Every other window of length 10 occurs only once.
strand="CCCCCCCCCCCC" → ['CCCCCCCCCC']
The window CCCCCCCCCC occurs three times (windows may overlap), but it is listed only once.
strand="ACGT" → []
The strand is shorter than 10 letters, so there are no windows and the answer is empty.
strand is one of A, C, G, Tstrand="GATTACAGATTACAGAT"
['GATTACAGAT']
Run checks the first 3 tests in your browser. Submit checks all 140 tests on the server, hidden ones included.