The analysis of algorithms involves studying something called the computational complexity of an algorithm to determine how much work the algorithm does in performing its task.
This, in turn, requires knowing the order of magnitude of any function we might come up with to express the amount of work done.
Algorithm analysis is an important part of computational complexity theory, which provides theoretical estimation for the required resources of an algorithm to solve a specific computational problem.
Most algorithms are designed to work with inputs of arbitrary length.