Computer Science
[Notes Index] Trude’s Guide to Computer Science
[Notes Index] Trude’s Guide to Computer Science
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. ...
From diodes and transistors, to a Turing complete computer.
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. ...
The C Programming Language