title: Running time of algorithms in seconds
body: <p>I understand that the running time of algorithms is expressed in Big O or Big omega notations and so on, but i still can't figure out how long in seconds (or milliseconds) a code gets executed. for example, n=10^6, and we do O(n), then how do i know how long it takes? i also understand that other statements within say, a for loop, will also contribute to the running time and that the time maybe different on different CPUs. But usually in coding contests, we are given a specific time, say 2-5 seconds and here i can't decide if my algorithm is efficient enough or what is making my code slow. thanks!</p>