Hacker News new | past | comments | ask | show | jobs | submit login

Are there compression algorithms that take longer than O(n)? My impression is that even two-pass encoding is O(n) with a large constant factor in front of it, but I’ve never actually thought this much about it.



Some LZ variants such as LZ77 and LZW are O(n), but LZH, for example, is O(n*logn) because of Huffman encoding. I agree that O(n) is not revolutionary, but the simplicity of this algorithm makes it faster to execute.


Isn't the log factor only in the alphabet size?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: