Skip to content

Algorithms & data structures project

A Java collection of common algorithms and data structures, implemented with explanatory video links.williamfiset/algorithms

Stars
18.9k
Forks
4.5k
Licence
MIT
Language
Java
Last update
5 months ago
Type
Learning resource

What it is

This repository holds Java implementations of many standard algorithms and data structures, such as trees, heaps, queues, hash tables, and dynamic programming problems. Each entry is a source file meant to show a correct and simple implementation. Many entries link to video explanations by the author on YouTube.

  • Read the source of a data structure such as a Fenwick tree or union find to see how it is implemented
  • Run a single algorithm class, such as BinarySearch, from the command line
  • Run the included test suite to check the implementations
  • Follow the linked video explanations while reading the matching code

Great for

  • Students learning data structures and algorithms in Java
  • Developers who want a reference implementation to compare against
  • Learners who prefer watching video explanations alongside code

Not ideal for

  • Developers who need production-ready, drop-in libraries, since the README frames these as demonstrations of implementation, not as a supported library
  • Readers who do not use Java, since the code is Java-only per the primary language
Step-by-step guide: how to use Algorithms & data structures projectInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: JDK 8 or newer · Bazel (recommended) or just a JDK

    Clone the repository

    git clone https://github.com/williamfiset/algorithms

    Run a single algorithm with Bazel

    bazel run //src/main/java/com/williamfiset/algorithms/search:BinarySearch

    Run all tests with Bazel

    bazel test //src/test/...

    Compile and run with only a JDK

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

    Run it

    • Clone the repository and open the project folder
    • Install Bazel or a JDK 8+ setup
    • Run the BinarySearch example with the Bazel run command or the javac and java commands from the README
    • Open a source file from the data structures or dp folders and read the implementation alongside its video
  3. 3

    Get the most out of it

    • Watch the linked YouTube video next to the matching source file
    • Run the tests for a single package, such as the sorting tests, to check behavior
    • Compare the iterative and recursive versions of an algorithm, such as edit distance

Downloads

Strengths

  • Covers a wide range of classic data structures and algorithms in one place
  • Includes companion video explanations for many entries, according to the README
  • Released under the MIT license, which allows reuse

Trade-offs

  • The README is truncated, so the full list of topics and the complete setup details are not verified here
  • Some entries are labeled as slower or simpler variants, so they are not all optimized for real-world use

How it compares

ProjectStarsTypeLevelUpdatedBest for
algorithms (this)18.9kLearning resourcebeginner5 months agoStudents learning data structures and algorithms in Java
Java66.7kLearning resourcebeginner5 days agoStudents learning algorithms and data structures in Java
LeetCode-Go33.8kLearning resourcebeginner25 days agoDevelopers practicing LeetCode problems in Go
Python226kLearning resourcebeginner17 days agoStudents learning algorithms and data structures
javascript-algorithms197kLearning resourcebeginner3 months agoStudents learning core computer science concepts in JavaScript
interviews65.5kLearning resourcebeginner1.5 years agoStudents preparing for their first software engineering interviews

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.