190k views
5 votes
What changes do you need to make to the algorithm to take as first input the numbers to be compared

User Radzak
by
5.0k points

1 Answer

2 votes

Answer:

Step-by-step explanation:

The constant function is useful in algorithm analysis, because it characterizes the number of steps needed to do a basic operation on a computer, like adding two numbers, assigning a value to some variable, or comparing two numbers. Executing one instruction a fixed number of times also needs constant time only.

User SwampThingTom
by
4.5k points