Giter Site home page Giter Site logo

project-euler-solutions-cpp's Introduction

Project Euler Solutions in C++

Build Status Codacy Badge license

My Account

This repository holds solutions to the Project Euler Problems implemented in C++. Most of the solutions here are not optimized much and use the usual method for solving these problems.

How This Project is Organized

To check out how a solution is implemented, go to the solutions directory, where you will see a folder structure as follows:

solutions/
├── data/
    ├── triangles.txt
    └── ...
├── Problem001.cpp
├── Problem002.cpp
└── ...

In this folder structure, each of the files labeled Problem***.cpp contain the corresponding Project Euler problem's solution. For example, the code for Problem 1 is located in Problem001.cpp, and the file contains the following code:

int main()
{
    int sumMultiples = 0;
    for (int i = 0; i < 1000; ++i)
    {
        /*
         * ... Solution code ...
         */
    }
    
    std::cout << sumMultiples << "\n";
}

Each of the solutions are independent of one another, don't depend on other files (other than the data files, see below), and have their own main function which solves the problem and prints out the solution to the console. Using this code is as easy as downloading and running the file.

The data directory in the folder structure contains the data files that some problems need for their solutions. For example, Problem 102 needs a file called triangles.txt for its solution. Thus, for Problem 102, there will be a file called triangles.txt in the data directory.

Compatibility

All of the solutions in this project are fully conformant to standard C++14, and are platform-independent.

Contributing

  1. Pull Requests

    Unfortunately, since this is a solo project being done by me, I will not accept pull requests of any kind. Therefore, any opened pull requests will be immediately closed.
  2. Issues

    If an error is found in one of my solutions, feel free to open an issue here, specifying exactly what went wrong and where, so I can easily fix it.

License

This project is licensed under GNU GPLv3 License, as outlined in LICENSE. Before using any of the code in this project, please read the license and follow its requirements.

project-euler-solutions-cpp's People

Contributors

arnavb avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

priyanshk20

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.