-3

What is the Time and space complexities of the LZ77 compression algorithm? I'm trying to implement the algorithm with the best possible space and time complexity

1 Answers1

0

You didn't say with respect to what variable. If you mean the length of the input data, which we will call n, then the time and space is always O(n). LZ77 is applied to a fixed-size window on the data that slides over it, where that size is independent of n.

Mark Adler
  • 101,978
  • 13
  • 118
  • 158
  • Thanks I did want it with respect to the input length (n) I forgot to specify with respect to what variable sorry and thanks for your help – Mahammad Ayman Oct 30 '22 at 11:34