Discussion:
Question and a couple (useful) observations
(too old to reply)
Jamie Hargrove
2005-10-03 08:54:04 UTC
Permalink
User-Agent: OSXnews .10/b
Xref: number1.nntp.dca.giganews.com utexas.class.cs337:404

First, a question - does anyone know what exactly we turn in? I assume
just the file(s) we change? (ie, AdaptiveTree.java and perhaps
Bonus.java)
Secondly, I'm finally finished with it, and I have a couple observations
about the code we were given that may prove useful...1) The place function will update the lookupTable even if the placed
node happens to be the zero node, thus overwriting the entry for the node
with the symbol 0 in it... I'd suggest either modifying place or making
certain you avoid ever placing the zero node. (Personally, I prefer
error checking over code that avoids its own pitfalls...)2) The function checkSpecialCase2 appears to return true if index == 1
even if the tree no longer has a zero node. I changed this, but the
original version of it seemed to work in my testing... still, this might
cause bugs.
--Jamie
Warren Hunt
2005-10-03 21:52:58 UTC
Permalink
Post by Jamie Hargrove
First, a question - does anyone know what exactly we turn in? I assume
just the file(s) we change? (ie, AdaptiveTree.java and perhaps
Bonus.java)
Secondly, I'm finally finished with it, and I have a couple observations
about the code we were given that may prove useful...1) The place function will update the lookupTable even if the placed
node happens to be the zero node, thus overwriting the entry for the node
with the symbol 0 in it... I'd suggest either modifying place or making
certain you avoid ever placing the zero node. (Personally, I prefer
error checking over code that avoids its own pitfalls...)2) The function checkSpecialCase2 appears to return true if index == 1
even if the tree no longer has a zero node. I changed this, but the
original version of it seemed to work in my testing... still, this might
cause bugs.
--Jamie
See the urgent updates page for what you should turn in.

-Warren

Loading...