Constant Factor
noun
say it: “KON-stunt FAK-ter” /ˈkɑnstənt ˈfæktər/
A fixed number a step count is multiplied or divided by, such as the 2 in 2n, which Big-O drops.
What is a constant factor?
A constant factor is a fixed number the steps are multiplied or divided by, like the 2 in 2n. Big-O drops it, because it doesn't change how the work grows: 2n still doubles when n doubles, so it's O(n).
In a sentence
- “Going through the playlist twice is 2n steps, but the 2 is a constant factor, so it's still O(n).”
Level: Journeyman · More Software Development terms at this level
Updated