#solution #euler #puzzle #challenge

yanked xfbs_euler

xfbs’ solutions to project euler problems

0.1.0 Apr 29, 2020

#8 in #euler

MIT license

320KB
895 lines

Project Euler Solutions

This is a repository of solutions to Project Euler problems. All of these solutions are written by me in an attempt to fool around with mathematics and sharpen my programming skills in a few languages.

Rules

  • A solution is only accepted when it:
    • yields the correct answer.
    • takes less than 1s (1000ms) to compute the answer. There are some solutions in here that take longer, because I couldn't (yet) get them there.
    • is completely written by myself, without having looked at someone else's solution (unless by accident). Don't wanna spoil the fun.
    • has a full and working testing suite. I like my code tested.
    • is well-documented, meaning that when reading it, it's obvious to see what is going on because the variables are named smartly and there comments to explain what is going on when necessary.
    • is elegant, meaning no more complex than it should be
  • Every language needs to be treated with respect by trying to use its idioms as much as possible and by avoiding hackery. That's kind of the point of this project — getting familiar with some dope new languages and their cool tricks
  • Code can be shared between solutions if it helps keeping things Dry.
  • When possible, the standard library of the language should suffice. I don't like depending on external libraries, especially when it can be useful to implement some things by myself. However, in some cases it's okay (for example, unit testing frameworks). When possible, I'll try to bundle external libraries into this repository.
  • The simpler the solution is, in terms of lines of code and complexity, the better.

License

See license.md for more information.

Dependencies

~1.5MB
~23K SLoC