Skip to content

Commit 24e1836

Browse files
jrlouis21Copilot
andcommitted
fix bug
Co-authored-by: Copilot <copilot@github.com>
1 parent 24a1f06 commit 24e1836

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

rounds/3_dna/solution.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ def _search_chunk(
2727
nl = data.index(b"\n", rec_start)
2828
raw = data[nl + 1 : rec_end]
2929

30-
if pattern not in raw:
30+
seq = raw.translate(_DELETE_TABLE, _DELETE_CHARS)
31+
32+
# Quick check: if the pattern isn't in the cleaned sequence, skip.
33+
if pattern not in seq:
3134
continue
3235

3336
record_id = data[rec_start + 1 : nl].strip().decode("ascii")

0 commit comments

Comments
 (0)