Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

algs4

> 编程语言
Open source

Algorithms, 4th edition textbook code and libraries

7.5K stars0 likes2 views
WebsiteGitHub

About

Algorithms, 4th edition textbook code and libraries

## Overview This public repository contains the Java source code for the algorithms and clients in the textbook Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne. The official version at https://github.com/kevin-wayne/algs4 is actively maintained and updated by the authors. The programs are organized in the package edu.princeton.cs.algs4. If you need only the class files (and not the source code), you can use algs4.jar instead.
## Design goals Our original goal was to cover the 50 algorithms that every programmer should know. We use the word programmer to refer to anyone engaged in trying to accomplish something with the help of a computer, including scientists, engineers, and applications developers, not to mention college students in science, engineering, and computer science. The code is optimized for clarity, portability, and efficiency. While some of our implementations are as fast as (or faster than) their counterparts in java.util, our main goal is to express the core algorithmic ideas in an elegant and simple manner. While we embrace some advanced Java features (such as generics and iterators), we avoid those that interfere with the exposition (such as inheritance and concurrency). ## Build managers This repository is intended for use with either the Maven or Gradle build managers. It can be run from either the command line or integrated into Eclipse, NetBeans, and IntelliJ. You can also access it via Bintray. ## Coursera Algorithms, Part I and II students Feel free to use this public repository to develop solutions to the programming assignments. However, please do not store solutions to programming assignments in public repositories. ## Copyright Copyright © 2000–2023 by Robert Sedgewick and Kevin Wayne. ## License This code is released under GPLv3. ## Contribute to this repository This wishlist.txt contains a list of algorithms and data structures that we would like to add to the repository. Indeed, several of the algorithms and data structures in this repository were contributed by others. If interested, please follow the same style as the code in the repository and thoroughly test your code before contacting us. ## Support for other programming languages Some of the code in this repository has been translated to other languages:
  • Scala by Gary Struthers
  • .NET by Quoc Thai
  • Python by ITU Copenhagen
  • Python by Li Hao
  • Go by Li Hao
## Credits Thanks to Peter Korgan for Maven and Gradle support.

Issues· 25 open

View all issuesOpen on GitHub
  • #132

    TarjanSCC Non-Recursive Version

    Updated Oct 7, 2025
  • #130

    why moveRedRight doesn't keep the tree left leaning?

    Updated Apr 23, 2025
  • #102

    Bintray will shutdown in May 1st 2021

    Updated Jul 16, 2024
  • #126

    java: cannot find symbol symbol: method getMenuShortcutKeyMaskEx() location: class java.awt.Toolkit

    Updated Feb 27, 2024
  • #114

    fix for quadratic time caused by substring() in LZW compression

    Updated Feb 6, 2022
  • #18

    No clear what is "repository" of algs4

    Updated Dec 2, 2021
  • #106

    Can I add 3-way QuickSort

    Updated Aug 13, 2021
  • #105

    translated to Rust

    Updated Aug 11, 2021
  • #90

    A problem occurred when run build file build.gradle

    Updated Oct 8, 2020
  • #79

    Incorrect instructions in Average.java

    Updated Jan 17, 2020

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 2, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言