I am with Jordan, except that, in my opinion, the complexity of a wall clock is better expressed as O (2 ^ m), where m is the size of each element, and not O (max (input)).
If each element has size m, the largest element will have an integer value of 2 ^ m (minus one, but nobody cares about that). By construction, the algorithm requires that the setup time be less than 1, a constant.
Thus, the wall time complexity is O (2 m), the complexity of the operation counter is O (n).
The modified algorithm, taking into account the installation time, is likely to have a time complexity of the O (2 ^ m + n) scale. For example, he could mark the current time at the beginning, calculate base_time = start_time + k*len(list) (for some suitable constant k), and then the threads of base_time+i sleeping until time. Then k*len(list) is obviously O (n) and i is equal to O (2 ^ m), as before, for all O (2 ^ m + n).
sabik Jun 09 '13 at 2:16 on 2013-06-09 02:16
source share