This is my playground project for Google CodeJam / KickStart / CodeForces tasks. Individual solutions are under respectively named src subfolders, published under MIT license.
I try to avoid cryptic blobs of instructions and crowded one-liners, keeping solutions understandable and sanely named. So, the code is sometimes more understandable than sportsmanlike, and I prefer it to be this way.
All recent solutions are in Go with minimal testing automation done in bash. Several years ago there'd been gradle automation for some Java solutions, still retained but not looked after.
I am using GoLand to format/inspect/tidy up the code and carry out usual git tasks. There are some handy live templates saving couple of keystrokes during the contest, too.
There're some pre-canned bits and pieces which look a bit like golang codebook.
The template alleviates some input/output buffering/performance and general verbosity issues of Go.
Another interesting bit is Competitive Companion Companion, which mints a fresh copy of the template, with test-cases scraped directly off the contest platform UI. This integrates with Competitive Companion browser extension.
- google's b+tree, with several fancy feature commits stripped for brevity (Apache 2.0)
- networks modelled as adjacency list and capacity matrix
- global min-cut algorithm, ford-fulkerson max flow
- largest common subsequence
- sequentially enumerating permutations
- sequentially enumerating all subsets with a bitset
- and, of course, our old friend, union-find
Most of this stuff passed in several submissions over time and got solid green results. Note that there are other defects which you may still observe in your particular instance.
Also, there're notable pieces which you'd need to rip out of specific solutions:
- prime factorization - not completely naive, but nothing really efficient as well
- wheel prime generation
- trie (java) - not really sure it's good for anything, the tests were rather weak