All the Java code here comes from Algorithms, 4th Edition, by Robert Sedgewick and Kevin Wayne.
The Swift code was written by myself. Although it is mainly a direct port of the Java code :)
The goal was to see how fast Swift would compare to a language such as Java in a somewhat non-trivial case.
The input used was largeUF.txt, also provided by the Algorithms book. It is about 27mb, so I left it out of the gist :)