COS 226 Final: COS 226 Princeton Final Fall 08 Solution

22 views5 pages

Document Summary

1: tst. (a) aaa aab ab ba bb bba bbbb (b, 2d tree. Put an x in each box if the string sorting algorithm (the standard version considered in class) has the corresponding property. mergesort. X stable in-place sublinear time (in best case) Note that in the best case, mergesort takes n log n string compares, but a string compare can takes constant time (if the two strings di er after a constant number of characters). Thus, the overall running time can be sublinear in the input size (total number of characters in the. N strings): data compression. a b a b b a b a b b a b b a b b. 4: pre x-free codes. (a) insert all of the codewords into a binary trie, marking the terminating nodes. Alternate solution 1: use a tst instead of a binary trie.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers

Related Documents

Related Questions