Skip to content

Commit f602377

Browse files
committed
add a pong game made with python
1 parent 0dd04c4 commit f602377

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

find_repeated_dna_sequences.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,6 @@ def compute_rolling_hash(s, lst_len, nucleotide_mapping, hash_set, ans):
2222
hash_set.add(hash_val)
2323

2424

25-
def build_hash(s, nucleotide_mapping, start_index):
26-
built_hash = (
27-
nucleotide_mapping[s[start_index + i]] * (4 ** (9 - i)) for i in range(10)
28-
)
29-
return sum(built_hash)
30-
31-
32-
def loop_through_hash_set(s, ans, lst_len, nucleotide_mapping, hash_set):
33-
for i in range(1, lst_len - 9):
34-
repeated_sequence = s[i : i + 10]
35-
hash_val = build_hash(s, nucleotide_mapping, i - 1)
36-
add_hash(ans, hash_set, hash_val, repeated_sequence)
37-
38-
3925
def find_repeated_dna_sequences(s):
4026
ans = set()
4127
lst_len = len(s)

0 commit comments

Comments
 (0)