Objective 01 - Understand logarithms and recall the common cases where they come up in technical interviews

Overview

What is a logarithm?

Logarithms are a way of looking differently at exponentials. I know that this is a bit of a vague definition, so let's look at an example.

What does the mathematical expression above mean? It's an abbreviation for the following expression:

What we are looking at above is two different ways to express an object that doubles in size with each iteration.

Another way to think about 2^5 = 32 is that 2 is the "growth rate" and 5 is the number of times you went through the growth (doubling). 32 is the final result.

Let's look at a few more expressions:

Now, to begin looking at logarithms, let's rewrite the exponential expressions above in logarithmic form.

Notice how we have essentially just moved around different pieces of the expression.

For our first expression,