Analasys of uncompress on a input with n words: Innermost loop: Init: O(1) + Terminiation test: O(1) + Times executed: O(80) X ( Time to execute body: O(n) (This is dependent on the addition of the words to the book, which uses the double-up method.) + Termination test: O(1) + Time for loop update: O(1) ) = O(n) Main loop: Init: O(1) + Terminiation test: O(1) + Times executed: O(n) X ( Time to execute body: O(n) + Termination test: O(1) + Time for loop update: O(1) ) = O(n^2) To force it to run O(n^2), have no or very litte compressed words. That way the program will have to add nearly every word to the dictionary, and resize the dictionary every once and a while.