The idea

Big O Notation
It's a notation that describes the complexity of an algorithm in function of the input size using its worst case scenario. It works for both time complexity and space complexity.

Sources