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

来源:互联网 发布:淘宝一千零一夜 编辑:程序博客网 时间:2024/05/16 10:17

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

0 0
原创粉丝点击