Skip to content

C and memory

Data structures and their cost

Lessons on this topic

Intermediate · 25 minYou are hereRead

Physical and logical structures

Memory offers two layouts, cells side by side and nodes joined by pointers. A stack, a queue or a tree is a set of rules for using one, written down as an abstract data type.

Intermediate · 20 minYou are hereRead

Counting steps

An algorithm’s cost is how its number of basic steps grows with the size of its input. One loop grows in a straight line; a loop over all pairs bends upwards.

Intermediate · 25 minYou are hereRead

Time and space complexity

Big-O notation names how fast a cost in time or memory grows, ignoring constant factors and small inputs. The common classes are 1, log n, n, n log n, n² and 2ⁿ.

Phasorium

Account

Sign inWith Google, GitHub or your email

Subjects

Site

Look