What are time complexity and Big O notation?

2 stars Asked often.

In one or two sentences
They describe how running time grows as input size grows. Big O writes the upper bound of that growth rate.

Think of your own answer first

Say it out loud, or type it below. What you type never leaves this device.

Follow-up questions

These are likely next questions from an interviewer. Think of your answer first, then press the button.

  1. 1 / 3

    Can an O(n) algorithm beat an O(log n) one?

Sources checked

This is a textbook level concept, so no outside source is listed.