Moved Big O notation.
This commit is contained in:
21
plan.txt
21
plan.txt
@ -114,11 +114,17 @@ Then test it out on a computer to make sure it's not buggy from syntax.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
Algorithmic complexity
|
||||
- nothing to implement
|
||||
- math explanation: https://www.youtube.com/watch?v=ei-A_wy5Yxw&index=2&list=PL1BaGV1cIH4UhkL8a9bJGG356covJ76qN
|
||||
- https://www.youtube.com/watch?v=V6mKVRU1evU
|
||||
- http://discrete.gr/complexity/
|
||||
- http://bigocheatsheet.com/
|
||||
arrays
|
||||
No need to spend a whole day on this.
|
||||
* - Description:
|
||||
- https://www.coursera.org/learn/data-structures/lecture/OsBSF/arrays
|
||||
- https://www.coursera.org/learn/data-structures/lecture/EwbnV/dynamic-arrays
|
||||
- Arrays: https://www.coursera.org/learn/data-structures/lecture/OsBSF/arrays
|
||||
- Dynamic Arrays: https://www.coursera.org/learn/data-structures/lecture/EwbnV/dynamic-arrays
|
||||
- Resizing arrays: https://class.coursera.org/algs4partI-010/lecture/19
|
||||
- Implement:
|
||||
* - Practice coding using arrays and pointers, and pointer math to jump to an index instead of using indexing.
|
||||
* - new raw data array with allocated memory (can allocate int array under the hood, just not use its features)
|
||||
@ -126,13 +132,15 @@ arrays
|
||||
* - capacity() - number of items it can hold
|
||||
* - is_empty()
|
||||
- at(index) - returns item at given index
|
||||
- cannot append or move if full - will not tackle allocating and copying to new memory
|
||||
- append(item)
|
||||
- append(item) - or push(item)
|
||||
- insert(index, item)
|
||||
- prepend(item) - can use insert above at index 0
|
||||
- delete(index)
|
||||
- remove(item)
|
||||
- find(item)
|
||||
- resize(new_capacity) // private function
|
||||
- when you reach capacity, resize to double the size
|
||||
- when popping an item, if size is 1/4 of capacity, resize to half
|
||||
- Time
|
||||
- O(1) to add/remove at end (amortized for allocations for more space), index, or update
|
||||
- O(n) to insert/remove elsewhere
|
||||
@ -260,9 +268,6 @@ Other data structures:
|
||||
- Know what NP-complete means.
|
||||
Recursion
|
||||
- when it is appropriate to use it
|
||||
Algorithmic complexity
|
||||
- http://discrete.gr/complexity/
|
||||
- http://bigocheatsheet.com/
|
||||
open-ended problems
|
||||
- manipulate strings
|
||||
- manipulate patterns
|
||||
|
Reference in New Issue
Block a user