Algorithm, Part I Princeton University 公开课第一周 Introduction

Coursera上的Princeton的公开课 Algorithm, Part I 开始了。有兴趣的小伙伴可以一起跟课程

为了尊重官方的协议这里不会直接贴出课程上的测验题的答案。可能会讨论解题思路,例题的代码等。

课程官网: https://www.coursera.org/learn/introduction-to-algorithms

参考书籍: Algorithms, 4th  (amazon.cn

书籍官网: http://algs4.cs.princeton.edu/home/


----------------------------------------------------------------------------------------------------------------

使用MacOSX作为实践环境(兼容bash命令,兼顾Java的UI图形显示)


参考文档:http://algs4.cs.princeton.edu/mac/


环境搭建

使用 OS Mac OSX EI Captain

Java SE 6

Algs4 Standard Library

DrJava IDE

Terminal


OSX 更新到最新版本


Java 使用JDK6 下载地址


Algs4 标准库安装包  algs4.zip


课程使用的Classmexer 来测量程序的运行内存使用情况 参考


第一步安装java运行环境就遇到了点问题,无限的verify安装包。没任何反应



查了一下apple的论坛里好像也有人遇到类似的问题。

https://discussions.apple.com/thread/7272884?start=0&tstart=0

go to spotlight and type in terminal. Once the terminal opens paste the following sudo nvram -d boot-args it will ask you for a password now enter your password. Note nothing has happened because you were not logged in. Now that you are logged in paste the same command and hit enter. Now restart you computer and install Java SE 6 runtime how to install legacy java se 6 runtime for mac 10.10 . All done.


中terminal中执行一下命令 sudo nvram -d boot-args

192:work stjohnson$ sudo nvram -d boot-args

Password:

192:work stjohnson$ 


然后重启电脑

就可以安装了


安装完成以后开始安装algs4 的运行库


首先需要开启 运行从internet上下载的app的权限

System Preferences -> Security and Privacy -> General -> Allow applications downloaded from: Anywhere .

否则将会提示文件损坏等错误。


然后运行下载好的algs4.app


安装过程会从algs4点官网下载许多运行库和辅助工具

参考这个文件  log.txt

全部安装完以后会在桌面创建两个快捷方式 DrJava  和 Terminal 并且运行一个标准库的例子



表示安装正确


可以使用两种方式来变成DrJava是一个IDE支持各种语法高亮,语句补完等。

习惯Terminal的话也可以使用Terminal

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值