These programs all appear in my book: Programming Challenges: The Programming Contest Training Manual
by Steven Skiena and Miguel Revilla, Springer-Verlag, New York 2003. See our website
http://www.programming-challenges.com for additional
information. This book can be ordered from
Amazon.com at a 30% discount!
The programs are made available under the following copyright notice:
Copyright 2003 by Steven S. Skiena; all rights reserved.
Permission is granted for use in non-commerical applications
provided this copyright notice remains intact and unchanged.
What follows are a list of all the files in this directory with a
brief description of what they are.
- 8-queens.java --- solve the eight queens problem using backtracking
- bfsdemo.java --- driver program demonstrating breadth-first search
- bignum.java --- implementation of large integer arithmetic
- Bignum_test.java --- test module of large integer arithmetic
- binomial.java --- compute the binomial coefficients using dynamic programming
- cgtest.java --- driver program for computational geometry routines
- class/ --- compiled java classes of the codes mentioned in this page
- connected.java --- compute connected components of a graph
- convexhull.java --- compute convex hulls of points in the plane
- datafiles/ --- a directory with test files for all the programs
- dfsdemo.java --- driver program demonstrating depth-first search
- dijkstrademo.java --- compute shortest paths in weighted graphs
- editbrute.java --- compute string edit distance *without* dynamic programming
- elevator.java --- elevator stop optimization via dynamic programming
- floyddemo.java --- compute all-pairs shortest paths in weighted graphs
- gcd_test.java --- compute the greatest common divisor of two integers
- geotest.java --- driver program for geometry routines
- graph.java --- a generic adjacency list-in-array graph data type
- lcs.java --- longest common subsequence of two strings
- name.java --- corporate name changing program -- string example
- netflowdemo.java --- network flow implementation -- augmenting path algorithm
- order.java --- demonstrate traversal orders on a grid
- permutations.java --- construct all permutations via backtracking
- plates.java --- compute the number of circles in two different packings
- Polly.java --- rank the desirability of suitors -- sorting example
- primdemo.java --- compute minimum spanning trees of graphs via Prim's algorithm
- primes.java --- compute the prime factorization of an integer
- queue.java --- implementation of a FIFO queue abstract data type
- QueueDemo.java --- a short demo of how a Queue ADT is used
- sorting.java --- implementations of primary sorting algorithms
- stringedit.java --- compute the optimal alignment matching two strings
- subsets.java --- construct all subsets via backtracking
- substringedit.java --- approximately match one string as a substring of another
- superman.java --- compute Superman's flight path -- geometry example
- test.bat --- use this file instead of test-script if you are a Windows user
- test-script --- run tests on each of the programs
- topsort.java --- topologically sort a directed acyclic graph
- triangulate.java --- triangulate a polygon via ear-clipping, and compute area
- war.java --- simulation of the children's card game War