O(1)
This denotes constant time. Running a statement like if (true) {...}
is constant time.
Another example of constant time is looking up a value in an object, array, or a hash table.
O(log n)
This denotes logrithmic time. Divide and conquer or recursive algorithms have a O(log n)
time complexity.
O(n)