GithubHelp home page GithubHelp logo

callmebetter / algs4 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kang8/algs4

0.0 0.0 0.0 38.78 MB

Algorithms Fourth Edition Reading Notes - 算法(第4版)读书笔记

License: GNU General Public License v3.0

Java 100.00%

algs4's Introduction

Algorithms Fourth Edition Reading Notes

本 repo 是我读算法(第4版)的读书笔记

本项目使用 maven 来管理,目录结构为:

src
└── main
    ├── java
    │   ├── algs4                  - algs4 提供的标准库
    │   └── kang
    │       │── section_11model    - 每章的代码、习题解答、读书笔记
    │       │── ...
    │       └── section_15uf       - 每章的代码、习题解答、读书笔记
    └── resources                  - algs4 提供的测试数据

以 BinarySearch 为例,如何使用该 repo。

首先确保你的机器上已经安装好 javamaven.

在创建 maven 项目时,我机器上的 Java JDK 为 openjdk version "18.0.2.1" 2022-08-18,故使用此项目请确保你的 Java 版本为 18。

环境安装好之后,使用 mvn compile 来编译 src/ 目录下的文件

mvn compile
# or `nvm compile -f your_local_pom.xml` in order to use other jdk version
# In this repo, you can use `mvn compile -f pom11.xml` to specify jdk 11.

Maven built-in jdk-version is settled after installation, while it's not easy to modify. see same question below: maven-uses-wrong-java-version

maven 会将编辑好的 *.class 以包名为目录放在 target/classes/ 目录下,同样会将 resources/ 中的文件编译到 target/classes 目录下。

所以要测试 BinarySearch,先进入 target/classes,紧接着调用 BinarySearch.class 即可:

cd target/classes
java kang.chapter1_1.BinarySearch tinyW.txt < tinyT.txt

有用的资料

algs4's People

Contributors

callmebetter avatar kang8 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.