What's a Single Pass?

In computing, a one-pass algorithm or single-pass algorithm is a streaming algorithm which reads its input exactly once. ... A one-pass algorithm generally requires O(n) (see 'big O' notation) time and less than O(n) storage (typically O(1)), where n is the size of the input.

What is a single pass?

A "single pass" means that each element in a collection of elements (be it: a list, an array, a set, a vector, a map, a tree, a graph, a string, etc.) is visited ("iterated over") once and only once - it doesn't matter if the procedure is recursive or iterative.

What does one pass mean in coding?

In computing, a one-pass algorithm is one which reads its input exactly once, in order, without unbounded buffering (you're not storing things elsewhere and counting that as one look).

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.