שלום, האם תוכלו לתת דוגמא נוספת מלבד הדוגמא שניתנה בסעיף א? כיוון שהדוגמא שניתנה טריוויאלית, אשמח לקבל דוגמא עם קלט יותר מסובך, למשל כאשר יש שני סוגי חזרות, לאיזה פלט תצפו?
תודה
הי מה הכוונה ב"שני סוגי חזרות"?
Hi,
Could we get additional examples and the desired results for strings such as:
"a"*13 "a"*12 "a"*6 + "bb" + "aaaa"
Thanks!
Nice examples! Here are the results:
>>> lz77_compress2_no_future("a"*13) ['a', 'a', 'a', [3, 3], [6, 6], 'a'] >>> lz77_compress2_no_future("a"*12) ['a', 'a', 'a', [3, 3], [6, 6]] >>> lz77_compress2_no_future("a"*6 + "bb" + "aaaa") ['a', 'a', 'a', [3, 3], 'b', 'b', [6, 4]]
Great, thank you!