private void solve(String outFile, int startAt, int endAt)
            throws IOException, InterruptedException, ExecutionException {
        Set<Result> set = new TreeSet<>();
        ExecutorService exe = Executors.newFixedThreadPool
            (Runtime.getRuntime().availableProcessors());
        CompletionService<File> queue = new ExecutorCompletionService<>(exe);
        List<WordFinder> solvers = map(startAt, endAt);
        for (WordFinder wf: solvers) {
            queue.submit(wf);
        }
        try {
            for (int n = solvers.size(), i = 0; i < n; ++i) {
                File found = queue.take().get();
                Set<Result> rs = readResults(found);
                System.out.println("Worker found " + rs.size() + " results.");
                for (Result r: rs) {
                    set.add(r);
                    maxWordLength = Math.max(maxWordLength, r.word.length());
                }
            }
            persist(set, outFile, maxWordLength + 2);
            // System.out.println("Found total of " + set.size() + " results.");
            // for (Result r: set) System.out.println(r.toString(maxWordLength + 2));
        } finally {
            exe.shutdownNow();
        }
    }