Git Product home page Git Product logo

euler__stbrumme's Introduction

This is a mirror of my C++ solutions for about half of the Project Euler problems

You can find the code along with in-depth explanations and live demos at https://euler.stephan-brumme.com

Below is an excerpt from https://euler.stephan-brumme.com/why/ :

Why do I publish my solutions ?

Almost always the solutions for problems at Project Euler consist of two parts:

  1. finding a mathematical way to break down the problem's structure into its elements
  2. writing an efficient program for step 1

I strive to:

  • explain my choice of algorithms and data structures
  • write fully commented C++ source code that compiles without warnings and without any external libraries
  • interactive tests for most problems
  • link to relevant Wikipedia / MathWorld / OEIS pages
  • link to other solutions, especially those that are written in other programming languages

Let's not forget that it helps me, too: only if I can explain a solution to someone else then I can be sure that I truly understood it in the first place. And practicing some of the lesser used features of C++ (such as algorithms hidden inside STL, like std::next_permutation) improves my overall coding skills as well.

Sounds like a win-win situation ...

"But You Shouldn't Publish Your Solutions !"

Project Euler encourages you NOT to publish solutions.

I have a different point of view:

  • 99% of my knowledge is based on things I was taught, I saw somewhere or I stumbled across
  • and maybe 1% is "original"
  • I'm pretty sure it's not just me - it's the way how all of us gain knowledge

So it boils down to:

  • having a good teacher
  • access to well-equipped library
  • and probably most important today: your skills in working with a search engine

If someone visits my website/repository then he/she already realized that he/she can't solve that problem and is doing the right thing: ask someone. That's the only way how knowledge can be spread - all famous scientists wrote books. Leonhard Euler was one of the most productive mathematicians and he published 866 papers/books/etc. He shared his knowledge. And a substantial number of my solutions is based on some of his formulas, I only solved them because I could look up his works.

Admittedly, there is no use in publishing lists of the results to Project Euler problems. In my opinion, these numbers don't matter at all: noone really cares whether the result of problem 1 is 233167, 233168 or 233169. That's why you find algorithms, explanations, links, code, ..., basically everything on my website - but not the results. Because these numbers don't teach you anything.

euler__stbrumme's People

Contributors

stbrumme avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.