Skip to content

Commit 253e909

Browse files
authored
Update split-a-string-into-the-max-number-of-unique-substrings.py
1 parent 436b871 commit 253e909

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/split-a-string-into-the-max-number-of-unique-substrings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def popcount(n):
2626
curr.append(s[i])
2727
if (mask&base) or base == 0:
2828
if "".join(curr) in lookup:
29-
mask = (mask | (base-1)) + 1 if base else mask+1 # pruning
29+
mask = (mask | (base-1)) + 1 if base else mask+1 # pruning, try next mask without base
3030
break
3131
lookup.add("".join(curr))
3232
curr = []

0 commit comments

Comments
 (0)