# kevin-wayne/algs4

Algorithms, 4th edition textbook code and libraries

Repository: https://github.com/kevin-wayne/algs4
Canonical: https://ross.abutalabs.com/products/algs4
Homepage: http://algs4.cs.princeton.edu/code/
Language: Java
License: GPL-3.0
License Family: copyleft
Last push: 2026-01-10T12:53:55+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 61, release rhythm 35, longevity 100
- inputs: {"age_days": 4020, "days_push": 235, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7519, forks 2659 (observed 2026-08-28T04:10:00.448002+00:00)

## What it is
The official Java source code and libraries accompanying the textbook 'Algorithms, 4th Edition' by Sedgewick and Wayne, packaged as edu.princeton.cs.algs4. It provides clear, educational implementations of fundamental algorithms and data structures such as sorting, searching, graphs, and strings.

## Use cases
- learn fundamental algorithms and data structures in Java
- follow along with the Algorithms 4th edition textbook
- complete Coursera Algorithms Part I and II programming assignments
- reference implementations of sorting, graph, and string algorithms
- set up a Java teaching environment for a computer science course
- study classic data structures like union-find, BSTs, and tries

## When to choose
- you are learning or teaching algorithms from the Algorithms 4th edition textbook
- you need clear, readable reference implementations of classic algorithms in Java
- you are a Coursera Algorithms course student working on assignments
- you want a simple, dependency-light Java library of core data structures

## When to avoid
- you need production-grade, thread-safe, or highly optimized data structures (use java.util or Guava)
- you need algorithms in a language other than Java
- you require concurrency support or advanced inheritance-based APIs
- you need a comprehensive algorithms library beyond the textbook's scope

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: education, developer-tools
- platform: jvm, cross-platform
- tags: algorithms, data-structures, textbook, computer-science, sorting, graphs, searching, java-library, coursera, education

## Member repositories
- kevin-wayne/algs4 (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:00.448002+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:37:29.443592+00:00, confidence not recorded.
  - readme: https://github.com/kevin-wayne/algs4 (fetched 2026-08-28T04:10:00.448002+00:00, sha 350928179281)
  - homepage: http://algs4.cs.princeton.edu/code/ (fetched 2026-08-29T08:32:59.332945+00:00, sha 825ca790e2fe)
  - site_page: https://algs4.cs.princeton.edu/faq (fetched 2026-08-29T08:32:59.342901+00:00, sha ad1e95aef60f)
  - site_page: https://lift.cs.princeton.edu/java/windows (fetched 2026-08-29T08:32:59.344767+00:00, sha ffe93dbabf1f)
  - site_page: https://lift.cs.princeton.edu/java/mac (fetched 2026-08-29T08:32:59.346824+00:00, sha 1f679bd5b383)
  - site_page: https://lift.cs.princeton.edu/java/linux (fetched 2026-08-29T08:32:59.348916+00:00, sha af6328486cd4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
