Exponential

Last updated

What is Exponential?

Exponential algorithms are those that grow at a rate of 2^n. This means that for each additional input, the algorithm will take twice as long to run. The following function is an example of an exponential algorithm:

def exponential(n):
    if n == 0:
        return 1
    return exponential(n - 1) + exponential(n - 1)

As you can see, the algorithm's runtime grows exponentially. For each additional input, the algorithm will take twice as long to run.

Free resources to learn Exponential

More in stage 3: Asymptotic Notation

Exponential: common questions

Can I learn Exponential in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Exponential in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Exponential tutorial for beginners?

It is lesson 32 of 188 in the free Computer Science roadmap, in stage 3, Asymptotic Notation. If you are new to Computer Science, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me