Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bab8e63

Browse files
authoredOct 8, 2024··
Update lz78.py
fixed a bug in a test case
1 parent c27a91e commit bab8e63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎compression/lz78.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def compress(self, text: str) -> list[Token]:
5959
>>> lz78_compressor.compress({})
6060
Traceback (most recent call last):
6161
TypeError: Expected string.
62-
>>> all(len(s) >= len(lz78_compressor.compress(x)) for s in (
62+
>>> all(len(s) >= len(lz78_compressor.compress(s)) for s in (
6363
... "", "AA", "AB", "AAA", "ABC", "ABCDEFGH"))
6464
True
6565
"""

0 commit comments

Comments
 (0)
Please sign in to comment.