import java.util.*;
import java.io.*;

public class Util
{
    public static final Vector<String> readLines (String inputFile)
    {
        /*
         * Open the data file and read it in.
         */

        BufferedReader reader = null;
        Vector<String> values = new Vector<String>();

        try
        {
            reader = new BufferedReader(new FileReader(inputFile));
            String line = null;

            while ((line = reader.readLine()) != null)
            {
                values.add(line);
            }
        }
        catch (Throwable ex)
        {
            ex.printStackTrace();
        }
        finally
        {
            try
            {
                reader.close();
            }
            catch (Throwable ex)
            {
            }
        }

        return values;
    }

    public static final int commonBlackTiles (Vector<Coordinate> blackTiles, Vector<Coordinate> adjacentTiles)
    {
        int count = 0;

        for (int i = 0; i < blackTiles.size(); i++)
        {
            if (adjacentTiles.contains(blackTiles.elementAt(i)))
                count++;
        }

        return count;
    }
}
@@ -872,22 +872,23 @@
 kTiles (
-Vector
+HashSet
 %3CCoordin
@@ -904,22 +904,23 @@
 kTiles, 
-Vector
+HashSet
 %3CCoordin
@@ -968,25 +968,24 @@
 nt = 0;%0A
-%0A
         
 for (int
@@ -980,50 +980,89 @@
     
-for (int i = 0; i %3C blackTiles.size(); i++
+Iterator%3CCoordinate%3E iter = blackTiles.iterator();%0A%0A        while (iter.hasNext()
 )%0A  
@@ -1112,30 +1112,18 @@
 ins(
-blackTiles.elementA
+iter.nex
 t(
-i
 )))%0A

Update Util.java