Determine the order of growth of the running time of this statement in Three Sum as a function of the number of integers n on standard input:
Answer: Linear. The bottlenecks are the implicit array initialization and the implicit input loop. Depending on your system, however, the cost of an input loop like this might dominate in a linearithmic-time or even a quadratic-time program unless the input size is sufficiently large.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here