Bug Fixes for Data Structures and Problem Solving Using Java
Bug Fixes
Here is the
bug fix
list for Data Structures
and Problem Solving Using Java, by Mark Allen Weiss.
The code online reflects all changes.
Click here to report a new error.
Major Problems
DATE WHO FILE PROBLEM
-------- --- --------------------------------- -------------------------------
02/09/98 EG Chapter07/RecSum.java Fix an infinite loop in main, by changing to mid=(low+high+1)/2
03/07/98 MAW DataStructures/PairHeap.java Declaring a vector of size N is an O(N) operation in Java.
So, in combineSiblings, must use array doubling,
or compute the size of the array before declaring it.
DATE WHO FILE PROBLEM
-------- --- --------------------------------- -------------------------------
03/14/98 MAW 22 files. Example is JDK 1.2 adds a class named Comparable in package java.lang.
DataStructures/AATree.java This creates a conflict with Supporting.Comparable.
Complete list Fix via an explicit import directive:
import Supporting.Comparable;
(Notice that had Comparable been placed in any class
except java.lang, there would have been no problem).
03/15/98 MAW AppendixD/GUI.java addItem is deprecated (use add instead).
03/15/98 MAW CircleApplet.java The stop method in java.lang.Thread is deprecated (but still works).
Minor Problems
DATE WHO FILE PROBLEM
-------- --- --------------------------------- -------------------------------
02/16/98 MAW DataStructures/AATree.java deletedNode is uninitialized in recursive remove;
could cause a problem if attempt is made to remove an item smaller
than any other item in the tree prior to at least 1 successful remove.
Fix by altering the public remove.
02/13/98 MAW DataStructures/Sort.java Fix the off-by-one error by changing the driver to pass k-1 instead of k
02/13/98 EG Chapter08/TestSort.java Fix the off-by-one error by changing the print statement after quickselect.
Comments, Spacing, etc.
DATE WHO FILE PROBLEM
-------- --- --------------------------------- -------------------------------
02/09/98 FR DataStructures/Queue.java Change most to least in the comment section.
02/09/98 FR DataStructures/QueueAr.java Change most to least in the comment section.
02/09/98 FR DataStructures/QueueLi.java Change most to least in the comment section.
04/13/98 BL Supporting/Random.java negExp returns a double; fix javadoc section to match.
Credits
EG Eric Gossett
BL Benson Limketkai
FR Fritz Ruehr