Q50

This question relates to the Reasonable Time Algorithm:

Click here to view the problem

Answer D is correct because in order for an algorithm to run in reasonable time, it must take a number of steps less than or equal to a polynomial function. Algorithm I accesses elements times (twice for each of n elements), which is considered in time. Algorithm II accesses elements (n times for each of n elements), which is in reasonable time. Algorithm III accesses 10 elements, which is in reasonable time.

Simple Explainations:

Unreasonable time: Algorithms with exponential or factorial efficiencies are examples of algorithms that run in an unreasonable amount of time.

Reasonable time: Algorithms with a polynomial efficiency or lower (constant, linear, square, cube, etc.) are said to run in a reasonable amount of time.