Big-oh notation simply tells the upper bound of a program in terms of function, and by upper bound i mean how worst a program can perform depending upon the size of input.So, we analyse the program/algorithm taking the input in such a way that it takes maximum time/space. And to denote all this we have Big-oh notation which will tell the approximation
of the running time in terms of function which is dependent upon size of input(usually n), so O(n)