

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Exponents
incomplete
2: Exponent Quiz
incomplete
3: Exponents Grow
incomplete
4: Non-Linear Growth
incomplete
5: Logarithms
incomplete
6: Logarithm Quiz
incomplete
7: Factorials
incomplete
8: Factorial Quiz
incomplete
9: Exponential Decay
incomplete
10: Logarithmic Scale
incomplete
11: Mean and Median
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Exponents are important to understand when it comes to the execution speed of an algorithm. If the number of operations grows quickly as the amount of input data increases, the algorithm will become slower and slower.
| Linear | Quadratic |
|---|---|
2 * 2 = 4 |
2 ** 2 = 4 |
3 * 2 = 6 |
3 ** 2 = 9 |
4 * 2 = 8 |
4 ** 2 = 16 |
5 * 2 = 10 |
5 ** 2 = 25 |
6 * 2 = 12 |
6 ** 2 = 36 |
7 * 2 = 14 |
7 ** 2 = 49 |
8 * 2 = 16 |
8 ** 2 = 64 |
9 * 2 = 18 |
9 ** 2 = 81 |
2*x, results in linear or straight growth.x^2, keeps growing faster and faster.Generally we try to avoid writing code that causes the usage of a resource to grow quadratically (with an exponent).
A notable exception is in cryptography and security: we want to force attackers to waste resources trying to get at our information.