In AP Computer Science Principles, an algorithm runs in reasonable time if the number of steps it takes grows polynomially (constant, linear, square, cube) with input size; algorithms with exponential or factorial growth run in unreasonable time and become impractical as inputs get large.
Reasonable time is the AP CSP way of asking a simple question. As the input gets bigger, does this algorithm's number of steps grow at a manageable rate, or does it explode? If the steps grow like a polynomial function of the input size (think n, n², n³, or even a constant), the algorithm runs in reasonable time. If the steps grow exponentially (like 2ⁿ) or factorially (like n!), it runs in unreasonable time.
Here's the intuition. A linear algorithm on 100 items takes about 100 steps. An n² algorithm takes about 10,000 steps. Annoying, but a computer shrugs that off. A 2ⁿ algorithm on 100 items takes more steps than there are atoms in the universe. That's the line AP CSP cares about. "Reasonable" doesn't mean fast or convenient. It means the algorithm stays usable as the problem scales up, instead of becoming impossible no matter how powerful your computer is. Per the CED, efficiency is an estimate of computational resources used, and the reasonable/unreasonable split is the big-picture classification of that estimate.
Reasonable time lives in Topic 3.17 (Algorithmic Efficiency) in Unit 3, under learning objective AP Comp Sci P 3.17.A, which asks you to do two things. First, explain the difference between algorithms that run in reasonable time and those that do not. Second, identify situations where a heuristic solution may be more appropriate. Those two skills are really one idea. When the exact algorithm for an optimization problem (like finding the shortest route) takes unreasonable time, you trade perfection for practicality and use a heuristic that finds a good-enough answer in reasonable time. This is also one of the most conceptually important ideas in the course, because it explains why some problems are effectively unsolvable in practice even though an algorithm for them exists. For the full efficiency framework, head up to the 3.17 Algorithmic Efficiency study guide.
Keep studying AP® Computer Science Principles Unit 3
Unreasonable time (Unit 3)
This is the direct flip side. Reasonable time means polynomial growth or slower, while unreasonable time means exponential or factorial growth. The classic example is brute-force traveling salesperson, which checks every possible route and grows like n!, so adding one more city multiplies the work.
Heuristic (Unit 3)
Heuristics exist because of unreasonable time. When the exact algorithm would take centuries, a heuristic uses a shortcut (like 'always go to the nearest unvisited city') to get a good-enough answer in reasonable time. The exam loves asking when this trade is worth making.
Optimization Problem (Unit 3)
Optimization problems, where you want the best solution among many, are where reasonable time matters most. Finding the truly best answer often requires checking an explosive number of possibilities, which is exactly why these problems push past reasonable time.
Decision Problem (Unit 3)
A decision problem has a yes/no answer, like 'is there a path from A to B?' The CED uses decision and optimization problems to set up efficiency analysis, because the same problem can have a fast yes/no version and a much slower find-the-best version.
Reasonable time shows up on multiple-choice questions in a few predictable shapes. One stem asks you what actually distinguishes reasonable from unreasonable time (answer: polynomial vs. exponential/factorial growth of steps relative to input size, not raw seconds on a clock). Another gives you a real scenario, like a recommendation system, and asks why it uses an approximation such as collaborative filtering instead of computing exact comparisons between all users. The answer is always that the exact approach takes unreasonable time at scale, so a heuristic is more appropriate. A third style hands you a specific complexity, like O(n!) for brute-force traveling salesperson, and asks why that doesn't run in reasonable time for real-world inputs. You won't do formal Big-O math on this exam. You just need to recognize growth categories and explain the practical consequence: polynomial scales, exponential and factorial don't.
These aren't fuzzy opposites, they have a precise dividing line. Reasonable time means the steps grow as a polynomial function of input size (constant, linear, n², n³). Unreasonable time means the steps grow exponentially (2ⁿ) or factorially (n!). The trap is thinking 'reasonable' means fast. An n³ algorithm can be slow and clunky but still counts as reasonable, because it scales in a way computers can actually handle. A 2ⁿ algorithm might feel fine on tiny inputs but is unreasonable, because it becomes impossible long before inputs get realistically large.
An algorithm runs in reasonable time if its number of steps grows polynomially with input size, meaning constant, linear, square, cube, and so on.
Algorithms with exponential (2ⁿ) or factorial (n!) growth run in unreasonable time because the work explodes as inputs get even moderately large.
Reasonable time is about how the work scales, not how many seconds the program takes, so a slow polynomial algorithm still counts as reasonable.
When the exact solution to a problem takes unreasonable time, a heuristic that finds a good-enough answer in reasonable time is often the better choice.
Brute-force traveling salesperson is the classic unreasonable-time example because checking every route grows factorially with the number of cities.
Learning objective AP Comp Sci P 3.17.A asks you to explain the reasonable/unreasonable distinction and identify when a heuristic is more appropriate.
Reasonable time describes algorithms whose number of steps grows polynomially with input size, like linear (n) or quadratic (n²) algorithms. Exponential (2ⁿ) and factorial (n!) algorithms run in unreasonable time. It's tested under Topic 3.17, Algorithmic Efficiency.
No. Reasonable time is about growth rate, not speed. An n³ algorithm can take a while but still scales manageably, so it's reasonable. A 2ⁿ algorithm might finish instantly on 10 inputs but becomes physically impossible to run on large inputs, so it's unreasonable.
The line is polynomial vs. non-polynomial growth. Reasonable means steps grow like n, n², or n³. Unreasonable means steps grow like 2ⁿ or n!, where each added input element multiplies the total work instead of just adding to it.
Because it checks every possible route, and the number of routes grows factorially. With 10 cities there are over 3.6 million routes, and with 20 cities the count exceeds 2 quintillion. That's why real applications use heuristics like nearest-neighbor instead.
No formal Big-O analysis is required. You need to recognize whether step counts grow polynomially or exponentially/factorially, classify the algorithm as reasonable or unreasonable, and explain when a heuristic is the smarter choice.
Connect this key term to the AP exam workflow: review the course, practice questions, and check related study tools.
Review units, study guides, and course resources.
Check this vocabulary in multiple-choice context.
Apply key concepts in written AP responses.
Estimate the exam score you are working toward.
Review the highest-yield facts before practice.
Put the full course together before test day.