Algorithms, 4th Edition 配套学习网站

本文介绍了《算法》第四版的配套学习网站,提供了Windows环境下简单Java编程环境的设置方法,包括下载algs4.exe进行默认安装,并使用javac-algs4和java-algs4命令来编译和运行程序。此外,还提供了书中代码和数据的下载链接,以及如何使用algs4.jar中类的导入说明。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

BOOK:Algorithms, 4th Edition by Robert Sedgewick andKevin Wayne 

Algorithms, 4th Edition 配套学习网站:http://algs4.cs.princeton.edu/

setting up asimple Java programming environment 

windows: Download algs4.exe 

默认安装后需要用到Book里面范例, 用javac-algs4/java-algs4 命令编译运行。

备注:

To make ourtextbook libraries accessible to Java, use the command javac-algs4 instead. Forexample, to compile TestAlgs4.java, which uses ourstandarddrawing library, the autoinstaller issues the the following command:

 

C:\Users\username\algs4>javac-algs4 TestAlgs4.java

To make ourtextbook libraries accessible to Java, use the command java-algs4 instead. Forexample, to test standard draw and standard audio type the following twocommands:

C:\Users\username\algs4\hello>java-algs4 edu.princeton.cs.algs4.StdDraw

[ displays a graphics window with some geometric shapes and text ]

 

C:\Users\username\algs4\hello>java-algs4 edu.princeton.cs.algs4.StdAudio

[ plays an A major scale ]

配套书中范例和数据文本:

CODE:http://algs4.cs.princeton.edu/code/

Download: programs as algs4.jar andthe data as algs4-data.zip.

 

说明:使用书中范例时候,可以使用统配符 import edu.princeton.cs.algs4.*; 替换范例中的 import 行

As of August 17,2015, the "default package" version of algs4.jar has been replacedwith a "named package" version. To access the classes in algs4.jar,you will need to use an import statement like the ones below:

import edu.princeton.cs.algs4.MinPQ;

import edu.princeton.cs.algs4.StdIn;

Note that the I/Olibraries from stdlib.jar are now contained in algs4.jar, so you no longer needstdlib.jar.

 




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值