2 ms·
Thing is, depending on the data, for most algorithms the Big O represents just the worst case. E.g. your O(n) list search algorithm would only take one lookup i
by varjag 11y ago
Thing is, depending on the data, for most algorithms the Big O represents just the worst case. E.g. your O(n) list search algorithm would only take one lookup if the first node contains the searched entry. Same goes for log, quadratic, cubic, and exponential algorithms. Even Ackermann's function would be just one call in its terminal case.