There is an algorithm of complexity O(n*Log(n)) , there is a computer with a 2.1GHz processor. Problem: how to calculate the running time of the algorithm on the machine if we know N ?
As I understand it, the complexity function is needed just to characterize the running time of the algorithm.
When calculating the time of the algorithm based on the complexity function, I’m confused by the fact that such things are not taken into account:
a = a+b;// O(1) 1с b = b+1;// O(1) 1с Total execution time of these operations is 2c, the complexity function is O (1). According to the function of complexity, somehow it is not possible to get the execution time of the algorithm. Is it possible, in principle, to determine the running time of an algorithm, knowing its complexity?