Computer Science

[Notes Index] Trude’s Guide to Computer Science

1 min · 71 words · TrudeEH

Algorithms & Data Structures

Time Complexity The amount of steps required for an algorithm to execute. Big O Notation Maximum time for n input size. (Upper bound - worst case) Omega Notation Minimum time for n input size. (Lower bound) Ω(n²) Ω(n log n) Ω(n) Ω(log n) Ω(1) If both are the same, use θ Searching Algorithms Algorithm Average Time Complexity RAM Linear Search O(n) | Ω(1) 0 Binary Search O(log n) | Ω(1) 0 Linear Search Check every element until n is found. ...

8 min · 1609 words · TrudeEH

Building a Computer From Scratch

From diodes and transistors, to a Turing complete computer.

22 min · 4476 words · TrudeEH

C Compiling

A compiler converts C code into machine code in 4 steps: Preprocessing (Convert all preprocessor instructions (#…) to C code.) Compiling (Convert C code to assembly.) Assembling (Compile the necessary libraries.) Linking (Merge the compiled code with the compiled libraries.) Libraries Libraries are pre-written collections of code that can be reused in other programs. On UNIX systems, they are usually located in the /lib/ and /usr/include directories. Math.h For example, math.h is very useful to implement complex arithmetic operations. ...

2 min · 415 words · TrudeEH

C Language

The C Programming Language

12 min · 2443 words · TrudeEH