Author: Stan Eisenstat
Subject: Re: [Cs323] hash function for decode?
Date: Saturday, 24 Oct 2020, 17:29:07
> Message Posted By: Unknown > > I see a hash function that can be used for encode - is there a hash > function provided that takes in a code and gives the respective chain? No. As stated in the specification: D. The string table consists of (CODE, PREFIX, CHAR) triples. Decode must find PREFIX and CHAR given a (nonempty) CODE, which is implemented most easily using an array of structs indexed by CODE. ... Thus decode does not need a hash function. --Stan-PREV INDEX NEXT