[Chloe Walt] [Year 2, Semester 1, 2021]
Unix and Data Structures 1
Chloe Walt
WLTCHL002 |
,1. Unix: 2 - 15
- Terminal
- Makefiles
- Git
- commands
- Shell/ Bash scripting
2. Data Structures: 16 - 57
2.1 Analysis of algorithms 16 - 22
- What is a data structure?
- Operations
- Best, Worst and Average case time complexities
- Algorithms - First Principles
2.2 Binary Trees 22 - 30
- Terminology
- Operations
- Traversal
- Complexity Analysis
2.3 Binary Search Trees 31 - 38
- Operations
- Analysis
2.4 AVL Trees 39 - 45
- What is it?
- Operations
- Rotations
2.5 Red-Black Trees 46 - 47
- Explanation
- Analysis
- operations
2.6 Hash Tables 48 - 57
- Trivial Hash Table
- Issues of Hash Tables
- Hash Function 1
- Hash Function 2
- Good Hash Functions
- Collision resolution
- Linear Probing
- Quadratic Probing
- Chaining
1
,TOPIC 1: UNIX
Development tools:
- When you don't have an IDE, you need to use development tools such as:
1. Text editor
2. Compilers
3. Makefile and git
4. Debuggers.
CREATING A FOLDER AND A CLASS:
1. joe HelloWorld.java -> Create a new file in joe. Name the class how you want
- control k x will save and exit the file
2. in terminal: ls -> lists files in a particular directory
3. mkdir HelloWorld-> make directory (This will be the folder name)
4. mv HelloWorld.java HelloWorld/ - > saving HelloWorld.java in directory HelloWorld
5. cd HelloWorld/
6. ls -l : shows class
7. java HelloWorld: compiles and prints code on screen
2
, i.e. Write Testing class. control-k-x to save and close.
BUILDING LARGE PROJECTS:
How do we efficiently compile larger projects without and IDE?
TOOLS: ant & make
1. ant (from apache)
- Java application to manage (Java) targets/ dependencies
- Uses XML for dependency
- pros: handles inner classes/ package dependencies easily
- cons: don't use it for other development purposes
2. make
- UNIX application - not designed for java (works best for C++)
- uses a text file that lists dependencies
- cons: issues with java inner classes
- use make with a configuration Makefile
make -f makefilename
3