Algorithms are a fundamental topic in computer science, power many of the largest companies today and are used in making many decisions that affect our day to day lives - in obvious places like Google's PageRank algorithm to more obscure use cases like national security and local policing.
In this introductory course, we're going to take our first steps towards understanding the world of algorithms and data structures. Before we can study individual algorithms we're going to spend time learning how to evaluate algorithms, how to make comparisons and how to develop algorithmic thinking
What you'll learn
Algorithmic thinking
Time and space complexity
Big O notation
Linear and binary search
Syllabus
Playing a Counting Game
Let's get a gentle introduction to algorithms by playing a simple game with two of my friends! Over the next few videos, we talk about algorithmic thinking, what an algorithm is and take our first look at two popular search algorithms
Chevron 7 steps
What Is an Algorithm?
6:30
Guess the Number
5:56
Defining an Algorithm
8:27
Quiz: Defining an Algorithm?
3 questions
Evaluating Linear Search
8:43
Evaluating Binary Search
6:13
Recap: Playing a Counting Game
3 questions
Time Complexity
Over the last few videos we watched two of my friends play a game with different strategies and different end results. These strategies were examples of real world algorithms but we still don't have a good understanding of which one was better.
In this stage we're going to take a look at time complexity and measuring the efficiency of algorithms.
Chevron 8 steps
Efficiency of an Algorithm
6:28
Constant and Logarithmic Time
6:32
Linear & Quadratic Time
4:37
Common Complexities
5 questions
Quasilinear Time
2:35
Exponential Time
7:58
Determining Complexity
3:59
Recap: Time Complexity
3 questions
Algorithms in Code
So far we've only been looking at algorithms in the abstract but you're here to learn how to implement them as well!
Over the next few videos let's write code to implement both linear and binary search.
Chevron 6 steps
Linear Search in Code
9:40
instruction
Linear Search Implementations
Binary Search in Code
10:03
Recursive Binary Search
13:07
instruction
Binary Search Implementations
Recap: Algorithms in Code
3 questions
Recursion and Space Complexity
We've seen how the runtime of algorithm can vary depending on the implementation and the size of the input but there's one measure of efficiency we haven't explored yet.
All algorithms run on computers and computers don't have infinite memory. Over the next few videos let's take a look at the memory cost of an algorithm as the input size grows, also known as space complexity.