For our purposes, a problem is a relation between input and output.
In this view, solving a problem, is designing a virtual "path" connecting input states to output states. This simple notion can leads to intuitive algorithm meta design.
In Python's list, "insert" is expensive, "append" is cheap. Because Python pre-assigns free space.where O forms a so-called asymptotic upper bound, Ω forms an asymptotic lower bound. The sets formed by Θ are simply intersections of the other two, that is, Θ(g) = O(g) ∩ Ω(g).