Changes

Jump to: navigation, search

Three-Star

7 bytes added, 01:22, 8 April 2018
LZW Data Compression Algorithm
for (int s = 1; s <= n/2; s*=2)
for(int j = 0; j < n; j +=2 * s)
a[j] += a[j + s];
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.
93
edits

Navigation menu