Here are some notes from the Youtube video An Entire Computer Science Degree in 12 Minutes.
The video was a good taster/refresher for many topics, and useful before diving in to the topics deeper.
Notes
- Structures logically store some information together to make it easier to access.
- Every time a function is called it creates a stack frame.
- Stack overflow: If you create (accidentally) so many stack frames that you run out of stack memory.
- Heap memory: sometimes when the stack pops we want the memory to stay around.
- If something is allocated on the heap, you are returned a pointer to that value.
- Simplifying logic:
- if(!A or !B) is same as if(!(A && B)).
- Commands can have additional arguments to them that are defined
- e.g. to list al files including hidden ones: ls -a
- Data structures:
- Queue: adds to the back and takes from the front
- Stack: adds to the top and takes from the top
- Trees
- Linked list: store some data then a pointer to the next data, etc, then null if end of list
- 2's compliment, to allow for storing positive and negative numbers in binary.
- Divide and conquer algorithms take a complex problem and break it into easier problems
- Operating systems have kernels. A kernel manages the system, for example every time you create a new instance of an object, or open a file, you are asking the kernel to do it for you.
- Sequential running of code line by line is called a thread of execution. you can have multiple threads of execution running at the same time.
- Coroutine: let you return but pause the function where yield return is, and when call function again the the code continues.
Created: 04-Sep-2022