Today I participated in Code Jam’s second round; I didn’t do very well, but it was definitely an entertaining experience.
As I mentioned in my previous post, multi-dimensional arrays are quite useful to solve algorithmic problems, but it’s not the only thing I’ve used; I also created a mini-development environment to code the solution, and I decided to release it as an open source project.
- Helper functions to read the input with ease.
- Support for file drag & drop for the input, and also an automatic “big file mode” for files too large to be placed inside a text field.
- Integrated Big Integer library; it comes with Tom Wu’s BigInt library, which is really handy to solve problems with very large numbers, which aren’t infrequent in Code Jam.
- Includes a “runner” web page that contains a simplified version of the IDE in a single file, so it’s easy to send along with the coded solution.
- Uses web workers to run the code in a separate thread, and local storage to remember the last data.
It’s compatible with at least Firefox and Chrome (the runner page should run in almost any browser). This tool has helped me achieve better scores in Code Jam, so I hope it can help you too!