add page description
This commit is contained in:
parent
65fc4af558
commit
cab44e03d3
|
@ -14,7 +14,57 @@
|
|||
</header>
|
||||
<main>
|
||||
<article>
|
||||
<h1>Eulerbooks</h1>
|
||||
<h1 id="eulerbooks">Eulerbooks</h1>
|
||||
<p>This is a collection of Jupyter notebooks containing solutions and
|
||||
discussions for the first 100 <a
|
||||
href="https://projecteuler.net">Project Euler problems</a> using <a
|
||||
href="https://www.sagemath.org">SageMath</a>.</p>
|
||||
|
||||
<p>My main goal with these notebooks is not simply to provide working
|
||||
code for solving the problems. Frequently, solutions to these problems
|
||||
are short, but they’re not always easy to follow without understanding
|
||||
some important mathematical principles. Therefore, my aim is to provide
|
||||
insight into the underlying algorithms and mathematical concepts that
|
||||
make an efficient solution possible. I personally find that these
|
||||
topics are frequently even more interesting than the problems
|
||||
themselves, which I see as mainly existing to provide situations to
|
||||
apply the concepts after learning about them. In short, it’s more about
|
||||
the journey, not the destination, so these notebooks mainly exist to
|
||||
discuss the former.</p>
|
||||
|
||||
<h2 id="approach">Approach</h2>
|
||||
<p>Frequently, either Python or SageMath provide functions and
|
||||
libraries that make it trivially easy to write a solution. I don’t have
|
||||
a problem with presenting solutions that use these, since for practical
|
||||
purposes, it’s better to use what’s already available than to reinvent
|
||||
the wheel. It also tends to lead to code that is easy to read and
|
||||
understand, which is the best kind of code.</p>
|
||||
|
||||
<p>However, when a function already exists that does the heavy lifting,
|
||||
I also tend to provide my own basic implementation and an explanation
|
||||
of why it works. This is especially true if a solution or algorithm is
|
||||
based off of an important mathematical concept that is not especially
|
||||
intuitive.</p>
|
||||
|
||||
<p>When not especially tedious, I like writing up solutions that do not
|
||||
require programming at all, since these approaches often require
|
||||
interesting mathematical techniques.</p>
|
||||
|
||||
<p>Another thing to note is that I don’t prioritize a solution’s
|
||||
performance above all. When a solution is fast enough (using Project
|
||||
Euler’s own “one-minute rule” as a rule of thumb), I instead usually
|
||||
focus on making the code easy to read. You can basically always
|
||||
optimize, but there are frequently diminishing returns, and it tends to
|
||||
negatively impact readability. Once a solution is fast enough to solve
|
||||
the problem at hand, I only consider optimizing further if the concepts
|
||||
are reusable.</p>
|
||||
|
||||
<h2 id="solutions">Solutions</h2>
|
||||
<p>Solutions are provided as non-interactive HTML renderings that you
|
||||
can view directly in your browser. Alternatively, you can download the
|
||||
Jupyter notebooks to play with them yourself. I've also marked some of
|
||||
my favorite problems.</p>
|
||||
|
||||
<table>
|
||||
<caption>
|
||||
Project Euler solutions
|
||||
|
|
Loading…
Reference in New Issue