Commit ac40138b authored by michael lundquist's avatar michael lundquist
Browse files

Adding the class notes folder and adding some notes on chapter1. This is...

Adding the class notes folder and adding some notes on chapter1. This is mostly for backup purposes.
parent 88aa0dee
# class notes 1_29_19
## reading from a file
- [Scanner](https://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html) can be used to tokenize a file
- remember to close everything with files
- you can append to a file.
- we always have to write with the buffer
## searching
- this class teaches designing the algorithm, then writing code for it.
- O(n) is time complexity
### Linear search
- searching one element at a time
- O(n)
### binary search
- Array must be sorted.
- lower and upper bound and middle index. Compare middle index to the element being searched for, and repeat with one half of the array.
- O(log(n))
### Insertion Sort
- happens in place
- The array has a sorted part and an unsorted part.
-
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment