Table of Contents
Algorithms and Data Structures implementation in java and python
- Union Find
- Stacks and Queues
- Elementary Sorts
- Mergesort
- Quicksort
- Priority Queues
- Elementary Symbol Tables
- Balanced Search Trees
- Geometric Applications of BST's
- Hash Tables
- Symbol Tables Applications
This is an example of how to list things you need to use the software and how to install them.
- Download and install java (https://www.java.com/en/download/)
- Test in terminal
> java Usage: java [-options] class [args...]
> java -version java version "1.8.0_341" Java(TM) SE Runtime Environment (build 1.8.0_341-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)
- Download and install the java jdk (https://www.oracle.com/java/technologies/downloads/#jdk19-mac)
- Test in terminal
> java -version java version "19" 2022-09-20 Java(TM) SE Runtime Environment (build 19+36-2238) Java HotSpot(TM) 64-Bit Server VM (build 19+36-2238, mixed mode, sharing)
- Get path
> /usr/libexec/java_home /Library/Java/JavaVirtualMachines/jdk-19.jdk/Contents/Home
- Set env variables in bash or zsh profile then restart shell
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-19.jdk/Contents/Home export PATH=%JAVA_HOME/bin:$PATH
- Test by creating sample code in a file named QuickStart.java
class QuickStart { public static void main (String[] args) { System.out.println("Hello, World."); } }
- Compile
> javac QuickStart.java > ls QuickStart.class
- Run
> java QuickStart Hello, World.
- If using vscode install coding pack for easier development: https://code.visualstudio.com/docs/java/java-tutorial
- This installs the following extensions:
Extension Pack for Java
Debugger for Java
Maven for Java
Project Manager for Java
Test Runner for Java
- This installs the following extensions:
- Setup Java Dev Environment
- Week 1
- Hello, World
- Union Find
- Analysis of Algorithms
- Week 2
- Stacks and Queues
- Elementary Sorts
- Week 3
- Mergesort
- Quicksort
- Week 4
- Priority Queues
- Elementary Symbol Tables
- Week 5
- Balanced Search Trees
- Geometric Applications of BST's
- Week 6
- Hash Tables
- Symbol Tables Applications