93
edits
Changes
→LZW Data Compression Algorithm
for (int s = 1; s <= n/2; s*=2)
As such, the major hotspot in this function is the second for loop. This is especially true since the file might be very large and we may be dealing with millions of characters! The one thing we need to worry about is that order does seem to matter for the second for loop.