Professional Documents
Culture Documents
-- Big-Oh Notation O
* <= g(n)
f(n) <= c.n
- c >= 0, n >= n0 >= 1
- pick any c and n0 make the statement valid
-- Big-Omega Ω
* >= g(n)
- f(n) ≥ c·g(n) ∀n ≥ n0
-- Big-Theta Θ
* = g(n)
c'·g(n) ≤ f(n) ≤ c''·g(n) ∀n ≥ n0
-- Memory
char: 1 byte
int: 4 bytes
float: 4 bytes
double: 8 bytes
<Type> *: 8 bytes(pointer)
int a[6];
int *p;
p = &a; // p: 0x1000 (HEX)
p = p+1;// p: 0x1004 (int:4 byte)
code
fixed-size, read-only region
machine code instruction
global data
fixed-size
global variables(RW)yes, constant strings(R)
heap
dynamic data structures created by malloc
stack
dynamically allocated data(function, local variable)
--
int main(int argc, char *argv[])
argc: number of arguments (include execute fie)
argv argument value(0: execute file name)
-- Graph
V: Vertex/Vertices
E: Edges
V ( V −1 )
Maxedges =
2