explaingit

williamfiset/algorithms

Analysis updated 2026-05-18

18,611JavaAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A comprehensive Java library of algorithms and data structures with clear implementations and video explanations for learning computer science fundamentals.

Mindmap

mindmap
  root((repo))
    Data Structures
      Trees and Graphs
      Hash Tables
      Queues and Stacks
      Advanced Structures
    Algorithms
      Dynamic Programming
      Graph Algorithms
      Sorting and Searching
      String Processing
    Learning Resources
      Video Explanations
      Clean Code Examples
      Step-by-step Walkthroughs
    Tech Stack
      Java 8 plus
      Bazel Build System
      Command Line Tools
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study how to implement classic data structures like AVL trees, hash tables, and segment trees correctly.

USE CASE 2

Learn graph algorithms such as Dijkstra's shortest path and network flow by reading clean Java code.

USE CASE 3

Prepare for coding interviews by reviewing implementations of dynamic programming and sorting algorithms.

USE CASE 4

Reference elegant solutions for string processing, geometry, and union-find problems.

What is it built with?

JavaBazel

How does it compare?

williamfiset/algorithmsdromara/sa-tokentencent/apijson
Stars18,61118,80218,408
LanguageJavaJavaJava
Setup difficultyeasyeasyeasy
Complexity2/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

This repository is a large collection of algorithms and data structures implemented in Java, aimed at demonstrating how to build common computer science building blocks correctly and clearly. Algorithms are step-by-step procedures for solving problems, data structures are the organized ways of storing data those algorithms operate on. The collection covers a wide range of topics. On the data structure side it includes trees (AVL, Red-Black, Binary Search, Splay), linked lists, queues, stacks, hash tables with multiple collision-handling strategies, priority queues, segment trees, sparse tables, suffix arrays, tries, and union-find. On the algorithm side it covers dynamic programming (coin change, knapsack, longest common subsequence, matrix chain multiplication, and more), graph algorithms (shortest paths, network flow, strongly connected components, Dijkstra, Bellman-Ford, Floyd-Warshall), sorting algorithms, searching, geometry, and string processing. Many of the implementations have companion video explanations on a YouTube channel, so if reading the code alone isn't enough, video walkthroughs are available. The project uses Bazel as its build system, you need at least Java version 8 and Bazel installed to compile and run anything. Individual algorithms can be run directly from the command line. The stated goal is to show the simplest and most elegant possible implementation of each concept, making it useful as a learning reference.

Copy-paste prompts

Prompt 1
Show me how to implement a Red-Black tree in Java using the code from this algorithms repository.
Prompt 2
Explain the Bellman-Ford algorithm for finding shortest paths using the implementation in this repo.
Prompt 3
How do I use the dynamic programming solutions in this repository to solve the knapsack problem?
Prompt 4
Walk me through the longest common subsequence algorithm implementation from this Java algorithms collection.
Prompt 5
Help me understand how the segment tree data structure works by examining the code in this repository.

Frequently asked questions

What is algorithms?

A comprehensive Java library of algorithms and data structures with clear implementations and video explanations for learning computer science fundamentals.

What language is algorithms written in?

Mainly Java. The stack also includes Java, Bazel.

What license does algorithms use?

Use freely for any purpose including commercial, as long as you keep the copyright notice.

How hard is algorithms to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is algorithms for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub williamfiset on gitmyhub

Verify against the repo before relying on details.