Facebook Pixel

Do we drop constants for Space Complexity too?

Yes, the exact same mathematical rules apply. Using 2 arrays of size N is O(2N) space, which simplifies to O(N) space complexity.

Verify This Answer

Cross-check this information using these trusted sources:

More FAQs in Why We Drop Constants in Big O Notation

Because Big O describes the overarching growth trend as data scales to infinity. A multiplier of 2 does not change the fact that the growth is linear.

In real-world milliseconds, O(N) is twice as fast. But in Big O academic notation, they belong to the exact same 'Linear' classification bucket.

It is a slower-growing term in a mathematical equation. For example, in O(N^2 + N), the N is non-dominant because as numbers get huge, N^2 completely overshadows it.

Still have questions?

Browse all our FAQs or reach out to our support team

Want to upskill yourself?

Our courses are taking a Coffee break, but your curiosity shouldn't. Stay engaged with namastedev linkedin, youtube, discord and other resources while you wait.

0
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.