Giter Site home page Giter Site logo

algorithms's Introduction

License: MIT Java CI with Gradle README Checker Donate

Algorithms & data structures project

Algorithms and data structures are fundamental to efficient code and good software design. Creating and designing excellent algorithms is required for being an exemplary programmer. This repository's goal is to demonstrate how to correctly implement common data structures and algorithms in the simplest and most elegant ways.

Contributing

This repository is contribution friendly ๐Ÿ˜ƒ. If you'd like to add or improve an algorithm, your contribution is welcome! Please be sure to checkout the Wiki for instructions.

Other programming languages?

This repository provides algorithm implementations in Java, however there are other forks that provide implementations in other languages, most notably:

Running an algorithm implementation

To compile and run any of the algorithms here, you need at least JDK version 8. Gradle can make things more convenient for you, but it is not required.

Running with Gradle (recommended)

This project supports the Gradle Wrapper. The Gradle wrapper automatically downloads Gradle at the first time it runs, so expect a delay when running the first command below.

If you are on Windows, use gradlew.bat instead of ./gradlew below.

Run a single algorithm like this:

./gradlew run -Palgorithm=<algorithm-subpackage>.<algorithm-class>

Alternatively, you can run a single algorithm specifying the full class name

./gradlew run -Pmain=<algorithm-fully-qualified-class-name>

For instance:

./gradlew run -Palgorithm=search.BinarySearch

or

./gradlew run -Pmain=com.williamfiset.algorithms.search.BinarySearch

Compiling and running with only a JDK

Create a classes folder

cd Algorithms
mkdir classes

Compile the algorithm

javac -sourcepath src/main/java -d classes src/main/java/ <relative-path-to-java-source-file>

Run the algorithm

java -cp classes <class-fully-qualified-name>

Example

$ javac -d classes -sourcepath src/main/java src/main/java/com/williamfiset/algorithms/search/BinarySearch.java
$ java -cp classes com.williamfiset.algorithms.search.BinarySearch

Data Structures

Dynamic Programming

Dynamic Programming Classics

Dynamic Programming Problem Examples

Adhoc

Tiling problems

Geometry

Graph theory

Tree algorithms

Network flow

Main graph theory algorithms

Linear algebra

Mathematics

Other

Search algorithms

Sorting algorithms

String algorithms

License

This repository is released under the MIT license. In short, this means you are free to use this software in any personal, open-source or commercial projects. Attribution is optional but appreciated.

Donate

Consider donating to support my creation of educational content:

paypal

algorithms's People

Contributors

williamfiset avatar micahstairs avatar abstratt avatar ealexan avatar rushabh-v avatar natanel-ziv avatar prashansa-k avatar rohitmazumder avatar ttskym avatar finnlidbetter avatar nishantc1527 avatar tianyishi2001 avatar tejaswgupta avatar khaledsamir avatar dineshsrd avatar c0untzero avatar berkelmas avatar atharvathorve avatar ealexa81 avatar tuanlinhtl17 avatar jasonsaruulo avatar samuelal avatar bekesibeks avatar bbowles98 avatar askenderski avatar usamaamjad avatar tschattschneider avatar thesohelshaikh avatar bishopmate avatar sharoha 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.