Here is a quick sketch of the solutions. In grading, I am looking only for a few things on each question, and an overall understanding of the important concepts. 1. C B B C C C C E 2. (a) toString is O(N), and the other two are O(1). (b) public String toString( ) { StringBuffer result = new StringBuffer( "[ " ); for( Node p = header.next; p != tail; p = p.next ) result.append( p.data + " " ); result.append( "]" ); return new String( result ); } (c) public void removeFirst( ) { if( header.next == tail ) throw new IllegalStateException( ); header.next = header.next.next; header.next.previous = header; } (d) // assume node is constructed as data/prev/next public void addLast( AnyType x ) { tail.prev = tail.prev.next = new Node( x, tail.prev, tail ); } 3. (a) public void add( String str ) { Set vals = theMap.get( str.toLowerCase( ) ); if( vals == null ) { vals = new TreeSet<>( ); theMap.put( str.toLowerCase( ), vals ); } vals.add( str ); } (b) public boolean contains( String str ) { Set vals = theMap.get( str.toLowerCase( ) ); return vals != null && vals.contains( str ); } (c) public boolean containsCaseInsensitive( String str ) { return theMap.containsKey( str.toLowerCase( ) ); } 4. public static File findMax( File d ) { File maxFile = d; if( d.isDirectory( ) ) for( File f : d.listFiles( ) ) { File thisFile = findMax( f ); if( thisFile.length( ) > maxFile.length( ) ) maxFile = thisFile; } return maxFile; }