Let's Learn Algorithms

Welcome to Let’s Learn Algorithms! In this article I am going to give you a broad level overview of what to expect with this series moving forward. If you want to jump straight to the lessons, you can by going to the lessons available now section. I won’t hold it against you, I promise.

In this series my goal is to help everyone who is just starting to learn algorithms get a better grasp on what they are learning. Specifically, the goal is t not only teach how an algorithm works at a conceptual level, but to ensure that anyone who finishes a lesson can also code the algorithm they just learned on their own without relying on any external resources.

How will the lessons be structured?

In order to achieve this, the series is going to be broken into “lessons”. Each lesson will focus on a single algorithm and will be composed of several posts (typically 3 or more). If it makes complete sense, a few algorithms may end up in a lesson together, but this will only happen if there is a very good reason for it.

The first post for each lesson will consist of an introduction to the algorithm that we will be focusing on. This will include information about why we use the algorithm, how it works at a broad level, and any other pertinent information to gain an overall understanding of the algorithm. The goal here is to be able to simply illustrate what we are going to be doing, not to actually be coding anything.

After that will be an article that covers the implementation details of the algorithm. We will walk through the algorithm in detail and I will demonstrate how to implement every detail of the algorithm. This is important to learning how algorithms work because many details of an algorithm can sound great at a conceptual level, but the implementation details might make things confusing.

For example, imagine you had a the following sorted hand of cards - Ace, 3, 8, 9, Jack, King - and I handed you a 4 and asked you to insert it into your sorted hand of cards. Conceptually this is pretty easy; You place it after the 3 and move the 8, 9, Jack, King cards all to the right one position, but when you go to actually code this you might realize that there are some details that weren’t covered at all when discussing the algorithm.

How do we find the location where we should insert our new card? Do we iterate over every card? Do we do a binary search?

These details might not seem pertinent at the time, but they can often be the difference between having an efficient algorithm and having an algorithm that simply can’t handle large inputs.

To remedy this issue we will actually be coding every algorithm that we discuss. Not only will we be coding the algorithm after we learn it, but we will also be doing “homework” to practice the algorithm. I will include a few sample problems to practice with along with every lesson, and then in the final articles for each lesson we will focus on working through those practice problems.

What language will we be using?

This is one of the more popular questions I anticipate getting, so I am going to just go ahead and say that my first pass at this will focus on implementing each algorithm in Go (aka Golang), a programming language created by Google.

I might eventually attempt to write solutions in other languages like Java and Python, but while I am just getting started this would overload me a bit too much so I won’t be doing it.

I have many reasons for choosing Go as the primary language for this series, and I have included a few of those below.

Go has the lovely Go Playground which allows me to link to code samples that can be run from a browser. This means you don’t actually have to install anything to see and tweak my code, which can be really helpful when learning.

2. Go code is easy to read

Many languages require writing code that isn’t always easy to follow along with. Java requires you to create a class for every single file you write. Python & Ruby abstract a few details away that I like to discuss because they can actually affect the runtime of your code. C/C++ are both much harder to read than Go.

While Go does have its own set of quirks that might seem weird at first, it is generally very easy to read and follow without being an expert at the language. And if I ever need to do something that isn’t obvious regardless of your understanding of the language, I’ll try to comment my code to explain what is going on.

3. I prefer it, and I am the one writing these lessons

Pretty self explanatory. As the author I get to push my personal preferences on everyone. :)

Deal with it animation.

4. I have a personal agenda

While I genuinely love teaching and helping others, free resources like this one don’t pay the bills. To do that, I need to consult and sell paid courses. To that end, I spent a long time creating the course, Web Development with Go, and my hope is that if you get a taste of Go you will be interested in learning more about building web applications with Go, and who better to teach you than the person who taught you algorithms with Go 😀.

Will there always be videos + text versions?

Originally I planned to do both text and video versions of each lesson, but unfortunately I don’t have the time to always create both. I also tried using a free transcript service, but it didn’t end up working very well.

Long term I hope to turn this series into a full-fledged course, similar to Gophercises, but for now some articles may have video, others text, and others both.

Will the code be published?

Yes! I will be publishing all of the solutions and code that I use in this series over at github.com/joncalhoun/lets_learn_algorithms.

I will try to create a directory for each lesson and provide a link in each lesson, but if you see me forget it in a lesson let me know about it.

Lessons available now

And now the section most of you are looking for. The complete list of existing lessons… which currently consists of a single article (sorry!).

I’ll continue adding each lesson here as it gets published, but my mailing list is still the best way to keep up-to-date on publications.

Bubble Sort

The first lesson I created focuses on one of the simpler sorting algorithms, bubble sort.

The second lesson is focused on binary search, a versatile and useful algorithm used to search for values in a sorted set.

Basic Data Structures

In this section we discuss some basic data structures that will commonly be using in algorithms going forward.

Graph Theory

In this section we talk about graphs, binary trees, how to store them in code, and some useful algorithms for traversing and searching a graph. Eventually we will cover more advanced topics like the min cost max flow algorithm, but for now this mostly covers the simpler algorithms for a beginner to dive into.

Get notified of new publications!

Want to know when I publish a new article? Sign up for my mailing list and I’ll send you roughly one email each week letting you know what new articles I have published along with what I am working on.

I’ll also send over a free sample from my course, Web Development with Go, and the occasional update when I release a new course, book, or product that I think you might be interested in. I typically include free samples and discount codes with those emails, and the content is very similar to what you are reading here so I think you’ll really enjoy it :)

Learn Web Development with Go!

Sign up for my mailing list and I'll send you a FREE sample from my course - Web Development with Go. The sample includes 19 screencasts and the first few chapters from the book.

You will also receive emails from me about Go coding techniques, upcoming courses (including FREE ones), and course discounts.

Avatar of Jon Calhoun
Written by
Jon Calhoun

Jon Calhoun is a full stack web developer who teaches about Go, web development, algorithms, and anything programming. If you haven't already, you should totally check out his Go courses.

Previously, Jon worked at several statups including co-founding EasyPost, a shipping API used by several fortune 500 companies. Prior to that Jon worked at Google, competed at world finals in programming competitions, and has been programming since he was a child.

Spread the word

Did you find this page helpful? Let others know about it!

Sharing helps me continue to create both free and premium Go resources.

Want to discuss the article?

See something that is wrong, think this article could be improved, or just want to say thanks? I'd love to hear what you have to say!

You can reach me via email or via twitter.

Recent Articles All Articles Mini-Series Progress Updates Tags About Me Go Courses

©2024 Jonathan Calhoun. All rights reserved.