#
*Contest Algorithms*

This web page collects links to slides and code examples I wrote to help our students
review/revise for the ACM-ICPC.
All the code is written in Java, which is a
rarity online, and one reason I've made it available here.

I am still updating and revising this material, and so it may contain
errors. However, all the code has been tested, and *appears* to work ☺

I have 'borrowed' examples from a wide range of sources, for which I
am very grateful.

If you find any mistakes in my slides or code, **please** get in touch
at ad@fivedots.coe.psu.ac.th,
and I will fix the problems as soon as possible.

##
Sections
Last Updated on 20th January 2016.

- 1. Introduction: slides (1.1 MB);
code

- 2. Java Features (e.g. 2D arrays, strings, regexs, bitwise ops): slides (1 MB);
code

- 3. Java Collections: slides (874 KB);
code

- 4. Backtracking: slides (243 KB);
code

- 5. Divide and Conquer: slides (505 KB);
code

- 6. Introduction to Graphs: slides (796 KB);
code

- 7. Graph Traversal: slides (570 KB);
code

- 8. Minimal Spanning Trees (MSTs): slides (505 KB);
code

- 9. Shortest Paths: slides (625 KB);
code

- 10. MaxFlow: slides (1 MB);
code

- 11. Dynamic Programming: slides (642 KB);
code

- 12. Maths (e.g. BigInteger, combinatorics, primes, GCD, modulo): slides (3.5 MB);
code

- 13. String Searching: slides (437 KB);
code

- 14. Computational Geometry (CG) Basics: slides (1.3 MB);
code

- 15 CG Topics (e.g. Sweeping, Convex Hull, Closest Pair of Points): slides (548 KB);
for code see section 14

- 15.5. Triangulation: slides (729 KB);
for code see section 14

- 16. Latitude and Longitude (e.g. great circles, the Haversine Law, Rhumb lines): slides (1.5 MB);
code

- All
the code as a single zip file (706 KB).

Last Updated on 9th January 2016.

Or you can view the code separated into sections.

Dr. Andrew Davison

E-mail: ad@fivedots.coe.psu.ac.th

Back to my home page