Linear Time An algorithm that runs in O(n), or linear, time has a very natural property: Its running time is at most a constant factor times the size of the input. One basic way to get an algorithm with this running time is to process the input in a single pass, spending a constant amount... Continue Reading →