
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
How to get it
- 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/algorithmsRun a single algorithm with Bazel
bazel run //src/main/java/com/williamfiset/algorithms/search:BinarySearchRun 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
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
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
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| algorithms (this) | 18.9k | Learning resource | beginner | 5 months ago | Students learning data structures and algorithms in Java |
| Java | 66.7k | Learning resource | beginner | 4 days ago | Students learning algorithms and data structures in Java |
| LeetCode-Go | 33.8k | Learning resource | beginner | 24 days ago | Developers practicing LeetCode problems in Go |
| Python | 226k | Learning resource | beginner | 17 days ago | Students learning algorithms and data structures |
| javascript-algorithms | 197k | Learning resource | beginner | 3 months ago | Students learning core computer science concepts in JavaScript |
| interviews | 65.5k | Learning resource | beginner | 1.5 years ago | Students 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.