Code exercises and personal notes from the book Algorithms (4th edition) by Robert Sedgewick and Kevin Wayne.
⚠️ reading in progress...
Follow these instructions "Installing the textbook libraries" to install algs4.jar
.
Download algs4.jar
file to your classes folder like: ~/algs4
(or any other folder of your preference).
Edit ~/.zprofile
file:
sudo vim ~/.zprofile
Add the following line and save:
export MY_CLASSPATH=~/algs4
export CLASSPATH=$CLASSPATH:$MY_CLASSPATH/algs4.jar:$MY_CLASSPATH
Do NOT forget to include the imports you need in your code:
# in your code
import edu.princeton.cs.algs4.StdIn;
import edu.princeton.cs.algs4.StdOut;
Compile your java class:
javac BinarySearch.java