TOPICS
Search

Linear Time


Linear time is a running-time bound O(n) for an algorithm on inputs of size n, using big-O notation. The number of steps is bounded above by Cn for some constant C and all sufficiently large n. It is a special case of polynomial time. For example, a minimum resolving set of a tree can be found in linear time, although the metric dimension decision problem is an NP-complete problem on graphs of treewidth two (Benoit 2026).


See also

Algorithm, Big-O Notation, Complexity Theory, Metric Dimension, Polynomial Time

Explore with Wolfram|Alpha

WolframAlpha

More things to try:

References

Benoit, T. "Metric Dimension Is NP-Complete on Graphs of Treewidth Two." 15 Oct 2026. https://arxiv.org/abs/2610.21133.

Cite this as:

Weisstein, Eric W. "Linear Time." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/LinearTime.html

Subject classifications