Error Information for Data Structures and Problem Solving Using Java (2/e)

Errata

Here is the errata list for Data Structures and Problem Solving Using Java (2/e), by Mark Allen Weiss. Some of the errors affect the source code; updates to the code are done automatically.

Click here to report a new error.

I'm very backlogged on these, as I am working on the Third Edition, which will use Java 1.5. Please be patient for a reply. Thanks!

First printing

  DATE   PAGE  WHO  PROBLEM
--------  ---  ---  ----------------------------------------------------------
07/14/04    6  TAS  Integral types should be defined here, to be
                    consistent with listing on pg 21.
09/12/01   35  DIH  Under 2.3.2. this + that requires an
                    additional space to generate this that
07/13/04   37  CA   In title of Section 2.3.5, change "of" to "to"
07/02/02   50  MKL  Change "throws" to "throw" in "do not place a 
                    throws clause in a try block.
01/10/02   79  LP   Margin note number 2, change "visibile" to "visible"
11/27/01   95  CA   Line 17, change p.age() to p.getAge()
11/27/01   95  CA   Lines 1,4, change "defined in the derived class's
                    public section" to "declared public in the derived class",
                    (and similarly for private section)
12/06/02   96  AB   Change "compatability" to "compatibility"
07/02/02  100  MKL  The end of paragraph 2 might convey that a static method
                    is a kind of final method. Add phrasing (or a paragraph break)
                    to make clear that it is not.
11/27/01  117  CA   Line 7, change "BufferReader" to "BufferedReader".
                    Also, at end of line 1, there should be hyphenation.
01/28/02  120  GN   Two lines from bottom, change "OutputStreamReader" to "OutputStreamWriter"
08/10/01  132  MAW  Line 12 of Fig 4.34 should be indented an additional 4 spaces
10/02/01  142  KH   Exercise 4.22, change "those methods" to "this method"
10/03/01  179  KH   In Fragment 8, change i=0 to i=1
02/26/02  200  EG   Line 47 is incorrect and should be replaced with:
                      if( low == arr.length || cmp.compare( x, arr[ low ] ) != 0 )
08/10/01  206  MAW  Figure 6.21 should be set in the main flow.
02/04/03  229  DR   Exercise 6.14, change "is still be" to "is still"
02/04/03  238  MW   Second margin note, change "the calls" to "then calls"
02/26/02  238  EG   Change Fig 7.2, line 7 to:
                       System.out.print( (char)  ( '0' + (n % 10) ) );
07/14/04  239  BD   Line 3, change "Theorem 7.4" to "Theorem 7.3"
07/13/04  240  RH   On line 10, change "Then the call at line 7" to "Then line 7"
02/27/02  256  CA   Line 12, add "=1" after "gcd(e,N')
07/14/04  263  RW   PAge 263, line 9, change Theorem 7.3 to Theorem 7.4.
10/09/01  269  LEA  Figure 7.23, line 12, change "i" to "j" in middle for loop expression
02/04/03  281  NTD  In Exercise 7.30, change ij.
02/26/02  285  EG   4 lines from bottom: change "such a a short" to "such a short" 
11/02/01  297  KH   Line 18, Fig 8.9, change "<" to "<=" (to make sort stable)
11/05/02  310  AR   Line 42, add semicolon at end of line.
01/10/02  343  AN   Exercise 9.10 has the wrong solution. See
                    http://gorilla.math.uwo.ca/~mdawes/courses/208/99/ballot_prob.html
07/13/04  344  RH   In Exercise 9.14, change a "u" to the Greek letter "mu".
03/22/02  386  EG   Line -9, rewrite second sentence as:
                    "Line 10 checks for the end of the input line.
                     When getToken() gets past line 11,
                     we know that more tokens are available."
10/24/01  415  KH   Line 9, change "and" to "an"
07/13/04  430  RH   In the footnote, change "Exercise 13.12" to "Exercise 13.11"
10/31/01  461  KH   Figure 14.15, line 28 should read
                      g.dijkstra2( startName );  // uses pairing heaps, Ch 23
07/13/04  465  RH   In the figure, the light shading is somehow lost in printing.
               CBH  The revised figure is here.
11/27/01  473  KH   Figure 14.28, change direction of edge (v1,v4).
11/27/01  473  KH   Line 9, change "three" to "four"
07/14/04  500  KE   Line 4, change "Interfaces" to "Inner classes"
07/14/04  509  KE   Caption for Figure 15.16 should reference Exercise 15.3, not Figure 15.3.
04/30/02  528  CTO  In Figure 16.23, lines 21, 27, and 29, change
                    "Figure 16.26" to "Figure 16.27"
10/30/01  531  EK   In Fig 16.27, line 26 return type should be boolean,
                    and line 28 should have "==" not "=".
02/09/01  538  GN, MS   Line 7, change Node to ListNode
01/31/01  591  MAW  In method first, the call to advance() should be part of the
          595       if; it is bad style to handle the empty tree case by
          598       catching NoSuchElementException
02/04/03  602  AB   Line 8, change "can you" to "you can"
03/22/01  612  JB   Line 5, change the comment to
                    throws ItemNotFoundException if the subtree is empty.
07/14/04  634  MW2  In Figure 19.38, captions (a) and (b), change "rotation" to "color flip"
11/27/01  641  KH   Line 4, change "x" to "item"
07/14/04  668  JM   The code for HashMap (and TreeMap too) incorrectly handles
               EM   the case where put is called with an already
                    existing key. It does not replace the value. The fix
                    requires four changes (the online code has been updated)
                    These changes can be summarized as follows:
                      1. In the Map.Entry interface, add method setValue
                      2. In HashMap.Pair and TreeMap.Pair, implement setValue
                      3. In MapImpl, change method put as follows
                     public Object put( Object key, Object value )
                     {
                         Object match = theSet.getMatch( makePair( key ) );
                         
                         if ( match == null )
                         {
                             theSet.add( makePair( key, value ) );
                             return null;
                         }
                         else
                         {
                             Map.Entry pair = (Map.Entry) match;
                             return pair.setValue( value );
                         }
                     }
08/26/03  672  HM   In line 6, change "625,500" to "625,000"
07/02/02  672  GC   In Figures 19.83 to 19.85, the last arrow leaving
          673       the root starts in the wrong place. It should be to the right
                    of where it is.
08/05/04  685  MAW  Change "avoid computation of X directly" to
                    "avoid computation of the polynominal directly"
11/29/01  699  JB   Fig 20.10, line 17 does not make the table size prime.
                    Probably the best fix is to modify line 41 in Fig 20.8
                    to say
                      { array = new HashEntry[ nextPrime( arraySize ) ]; }
07/02/02  700  EG   getMatch has a bug, because it returns a non-null item
                    if x is lazily-deleted. Fix it by changing the test to
                       if( !isActive( array, currentPos ) )
07/13/04  712  RH   On line 19, change "legal basic program" to "legal BASIC program"
02/27/02  730  JN   In Figure 21.24, the left vhild of the rightmost non-leaf
                    should be bold.
03/22/02  853  CA   Line 6, the parameters of drawLine are out of order.
                    Should be (int x1, int y1, int x2, int y2)
08/26/03  858  LML  Put , WindowAdapter at end of line 2 in Fig B.12.
                    Of course, that makes the line illegal, as described
                    in the text.

Credits

LEA  Luna Etsuko Adachi
CA   Claude Anderson
AB   Andrew Boese
CBH  Chr. Bohr-Halling
JB   James Brink
GC   Gene Chase
NTD  Nguyen Thao Dan
BD   Barbara De Los Santos
KE   Krishna Ersson
DIH  David I. Heiman
KH   Keld Helsgaun
RH   Rodney Hoffman
EK   Eric Knowles
MKL  Ming Kin Lai
LML  Luis Miguel Lourenco
EM   Eva Magnusson
JM   John Mayer
HM   Hidetoshi Mino
GN   Giri Narasimhan
JN   Jai Navlakha
AN   Anders Nielsen
CTO  Charles T. Otwell
LP   Liping Peng
AR   Andre Raunehaug
DR   David Rickard
TAS  Thomas A. Simone
MS   Morten Simonsen
MW   Matthew Weinstock
MW2  Michael Wollowski
RW   Richard Wicentowski

Printing History

First Printing: July 2001
You can see which printing you have by looking at the bottom of the copyright page for a sequence of numbers. If you see
1 2 3 4 5 6 7 8 9 10
you have the first printing.