best way to learn algorithms [learning algorithms asap]

Best Way to Learn Algorithms in 2024 [Learning Algorithms ASAP]

Today we’re looking at some of the best courses and books to learn algorithms this year.

What are algorithms?

In computer science, an algorithm is a set of rules that need to be followed to solve a problem or perform a computation.

The process of following a recipe to bake a cake is a perfect example of a delicious algorithm:

What is the best way to learn algorithms?

We’ve found that the best way to learn algorithms is either with courses or books.

And today we’re looking at 11 of the best courses and books to learn algorithms.

TLDR: Best Way to Learn Algorithms

๐Ÿ”ฅBest Course ๐Ÿ”ฅ
AlgoExpert


๐Ÿ’ฅ Best Book ๐Ÿ’ฅ
The Algorithm Design Manual

Learn Algorithms: Courses

Now we’ll check out some algorithms courses for beginners and beyond.

1. Data Structures and Algorithms in Python: Educative.io

๐Ÿ’ฐ Price: $59 for the course / $59 per month or $199 per year for all courses and Learning Tracks
โฒ๏ธ Duration: 19 hours
๐Ÿ“‰ Level: Intermediate
๐Ÿ–ฅ๏ธ Format: Interactive learning
๐ŸŽ–๏ธ Certificate: Yes

Ready for a hands-on approach to learning algorithms?

Educative.io is the only platform on our list to learn algorithms that uses exclusively interactive learning.

This means you’ll do all exercises within the same browser.

In the intermediate course Data Structures and Algorithms in Python, you’ll learn about the most common data structures and algorithms.

Binary search exercise in the course Data Structures and Algorithms in Python on Educative.io

Course Layout

With 14 challenges and 91 coding playgrounds, you’ll learn about:

โœ… stacks

โœ… linked lists

โœ… arrays

โœ… recursion

And much more.

In each module, you’ll work on a series of lessons, examples and exercises:

Recursion lesson in the course Data Structures and Algorithms in Python on Educative.io

Find out why Eric loves Educative.io:

I’ve tried probably 5-7 different sites and Educative is easily the best.

Eric Downs, Musician/Entrepreneur

Support

Educative.io has a section at the end of each lesson where you can get support from instructors, moderators and other students.


2. Introduction to Algorithms in Python: RealToughCandy.io

๐Ÿ’ฐ Price: Free
โฒ๏ธ Duration: 2 hours
๐Ÿ“‰ Level: Beginner+
๐Ÿ–ฅ๏ธ Format: Video
๐ŸŽ–๏ธ Certificate: No

Like Zero to Mastery, RealToughCandy.io is a newbie-friendly, video-based learning platform.

Python developer interview headshot of Joy
Joy Brock, Instructor

That means for this course, you’ll do all work on your local computer.

Introduction to Algorithms in Python is a free course taught by Joy Brock, a skillful and enthusiastic Pythonista.

Her teaching style is informative with a bit of humor sprinkled in.

This can make learning a bit lighter than some other algorithms courses.

For this algorithms course, you should have a firm grasp of Python basics like:

๐Ÿ“Œ loops

๐Ÿ“Œ variables

๐Ÿ“Œ functions

And more.

This course can be beneficial for new software developers, aspiring machine learning engineers, and for “pre-FAANG” prep.

It covers:

โœ… recursive algorithms

โœ… data structures

โœ… divide & conquer

โœ… greedy algorithms

โœ… dynamic programming

No previous algorithms experience is required.

Course Layout

Introduction to Algorithms in Python clocks in at around 2 hours of runtime.

But don’t let that fool you.

This is a fast-paced course jam-packed with information.

Exercise explanation in Introduction to Algorithms in Python on RealToughCandy.io

In fact, you’ll work on more than 15 coding challenges such as:

โœ… factorials

โœ… permutations

โœ… traveling salesman problem

โœ… fractional knapsack problem

And many more.

Problems range from “Easy” to the challenging “Mindbreaker.”

Problem walkthrough in Introduction to Algorithms in Python on RealToughCandy.io

You’ll also find over 60 quiz questions that are multiple choice, true/false and fill-in-the-blank.

Support

RealToughCandy.io has a Discord with 24/7 support.


3. Master the Coding Interview: Data Structures + Algorithms: Zero to Mastery

๐Ÿ’ฐ Price: $39 per month or $279 per year for all courses
โฒ๏ธ Duration: 19.5 hours
๐Ÿ“‰ Level: Intermediate
๐Ÿ–ฅ๏ธ Format: Video
๐ŸŽ–๏ธ Certificate: Yes

Like Treehouse, Zero to Mastery is a video-based, newbie-friendly learning platform. So you’ll do all work on your local machine.

Andrei Neagoie headshot creator of The Complete Web Developer in 2020 Zero to Mastery
Andrei Neagoie

But Zero to Mastery has something no other platform has got: Andrei Neagoie.

For those of you who don’t know, Andrei is a renowned instructor of well-known courses like Complete Web Developer and Master the Coding Interview: Big Tech (FAANG) Interviews.

He was also a Senior Software Developer for companies in Toronto and Silicon Valley.

Master the Coding Interview: Data Structures + Algorithms follows in the footsteps of Andrei’s other top-rated courses.

Lesson on recursion in the course Master the Coding Interview: Data Structures + Algorithms on Zero to Mastery

In this intermediate course, you’ll learn how to ace coding interviews by becoming a better developer.

This includes learning and implementing different data structures and algorithms.

Course Layout

In this video-based course, you’ll find over 20 modules covering topics like Big O notation and solving coding problems. More importantly, you’ll spend the majority of your time with data structures and algorithms such as:

โœ… recursion

โœ… sorting

โœ… searching

And dynamic programming.

Each module contains a series of detailed video lessons.

Lesson on sorting in the course Master the Coding Interview: Data Structures + Algorithms on Zero to Mastery

What students are saying about RealToughCandy.io:

Perfectly edited high quality videos that won’t waste your time.

Mike

Support

Zero to Mastery has Discord and LinkedIn communities where you can interact with instructors and other students.

Use code FRIENDS10 at checkout and SAVE 10%


4. AlgoExpert

๐Ÿ’ฐ Price: $99 per year
โฒ๏ธ Duration: 100+ hours
๐Ÿ“‰ Level: Beginner+
๐Ÿ–ฅ๏ธ Format: Interactive learning + video
๐ŸŽ–๏ธ Certificate: Yes

cleฬment mihailescu headshot co-founder of algoexpert
Clรฉment Mihailescu

AlgoExpert is the brainchild of ex-Google and ex-Facebook employee Clรฉment Mihailescu.

He actually created the platform to help himself prepare for his Facebook interview (it worked)!

With AlgoExpert’s unique blend of interactive learning (Educative.io) and video lessons (Zero to Mastery), you’ll find well over 150 algorithms questions ranging from Easy to Very Hard.

AlgoExpert control panel with video explanation of Nth Fibonacci
Video explanation of Nth Fibonacci on AlgoExpert

In addition to algorithms questions, you’ll find a data structures crash course.

Layout

AlgoExpert has a 4-pane integrated workspace where you can:

โœ… read the prompt

โœ… use the scratchpad

โœ… see solutions with spoiler alert function

โœ… watch the video explanation

4-pane integrated workstation environment in AlgoExpert
4-pane integrated workspace on AlgoExpert

You can solve problems in 9 programming languages:

JavaScriptTypeScriptPython
SwiftKotlinC++
JavaC#Golang

Find out what Nick thinks of AlgoExpert:

…AlgoExpert… helped me land an offer with Facebook!

Nick, Software Engineer Intern at Facebook

Support

You won’t find an official AlgoExpert community. But there are plenty of forums online where you’ll find other AlgoExpert users.

Use AlgoExpert promo code realtoughcandy at checkout and SAVE 10%


5. Java: Algorithms: Codecademy Pro

๐Ÿ’ฐ Price: $39.99 per month or $239.88 ($19.99/mo) for all courses and Learning Tracks
โฒ๏ธ Duration: 7 hours
๐Ÿ“‰ Level: Beginner
๐Ÿ–ฅ๏ธ Format: Interactive learning + video
๐ŸŽ–๏ธ Certificate: Yes

Codecademy Pro uses a blend of interactive learning paired with the occasional video. You’ll do all work inside the browser.

So it’s kind of like Educative.io, but with videos.

In the beginner course Java: Algorithms, you’ll spend plenty of time on recursion. Then you’ll look at searching and sorting algorithms.

Introduction to recursion in the course Java: Algorithms on Codecademy Pro

Course Layout

There are 3 modules in Java: Algorithms:

โœ… Recursion

โœ… Algorithmic Complexity

โœ… Searching and Sorting

Each module contains articles, lessons and multiple choice quizzes.

Lesson on call stacks in the course Java: Algorithms on Codecademy Pro

Support

Codecademy Pro has forums where you can connect with other students, get help and share projects.


6. Land a Job Easily: Java Algorithms & Data Structures Interview Questions: BitDegree

๐Ÿ’ฐ Price: $16.65
โฒ๏ธ Duration: 1.5 hours
๐Ÿ“‰ Level: Intermediate
๐Ÿ–ฅ๏ธ Format: Video
๐ŸŽ–๏ธ Certificate: Yes

BitDegree follows in the footsteps of Zero to Mastery and Treehouse. Java Algorithms & Data Structures Interview Questions is completely video-based.

So you’ll do all work on your local machine.

In this intermediate course, you’ll look at some of the most popular data structures and algorithms asked at tech interviews.

Lesson on booleans in the course Java Algorithms & Data Structures Interview Questions on BitDegree

Course Layout

In Java Algorithms & Data Structures Interview Questions, you’ll watch a series of videos presenting problems and solution walkthroughs.

You’ll work on problems such as:

โœ… palindrome

โœ… two eggs

โœ… k-th smallest element in a search tree

And beyond.

Palindrome example in the course Java Algorithms & Data Structures Interview Questions on BitDegree

All problems and solutions are presented in Java. Duh.

Support

BitDegree has a support section after most videos where you can get help from instructors and other students.


7. Introduction to Algorithms: Treehouse

๐Ÿšจ ALERT ๐Ÿšจ

As of September 2021, Treehouse has laid off 90% of its staff. The future of Treehouse is unknown.

๐Ÿ’ฐ Price: $25 per month for all courses and Learning Tracks / $49 per month for additional content
โฒ๏ธ Duration: 2.25 hours
๐Ÿ“‰ Level: Beginner
๐Ÿ–ฅ๏ธ Format: Video
๐ŸŽ–๏ธ Certificate: No

Unlike Educative.io, Treehouse is a video-based learning platform that newbies flock to. You’ll do all work outside of the browser on your local machine.

In the beginner course Introduction to Algorithms, you’ll first learn how to evaluate algorithms and develop algorithmic thinking. From there, you’ll discover:

โœ… time and space complexity

โœ… Big O notation

โœ… linear and binary search

And beyond.

Linear search diagram in the course Introduction to Algorithms on Treehouse

Course Layout

Introduction to Algorithms contains four modules where you’ll play a counting game, implement algorithms and more.

Each module contains a series of video lessons and quizzes.

treehouse video of man speaking
Instructor explaining algorithms in the course Introduction to Algorithms on Treehouse

For example, in the last module, you’ll learn about recursive functions and space complexity. Then you’ll recap and answer 4 multiple choice questions.

Support

Treehouse has a forum where you can get help from other students.

Learn Algorithms: Books

Now we’ll take a look at some of the best books for learning algorithms.

8. Grokking Algorithms

๐Ÿšจ Ideal for: self-taught programmers, engineers
๐Ÿ’ฅ Major topics: search, sort and graph algorithms

Grokking Algorithms cover with 5 rats sitting and one standing

In Grokking Algorithms, you’ll find over 400 illustrations covering search, graph and sort algorithms.

With detailed walkthroughs, you’ll learn how to apply common algorithms to every day programming problems.

You’ll also work with data compression and artificial intelligence.

All code samples are written in Python.

Grokking Algorithms book with Binary Search explanation with 2 illustrations
Binary search lesson in the book Grokking Algorithms

9. The Algorithm Design Manual

๐Ÿšจ Ideal for: programmers, researchers, students
๐Ÿ’ฅ Major topics: randomized algorithms, hashing, divide and conquer

The Algorithm Design Manual cover with various shapes

Like Grokking Algorithms, The Algorithm Design Manual by Steven Skeina takes an image-rich approach to designing and analyzing algorithms. With over 100 problems from LeetCode and HackerRank, you’ll discover:

  • randomized algorithms
  • hashing
  • divide and conquer
  • approximation algorithms

And more.

You’ll learn the best implementations in C, C++ and Java.

diagram of insertion sort and lines of code and 2 paragraphs
Insertion sort lesson in the book The Algorithm Design Manual

Covers all the basic algorithms that any and every programmer and data scientist is expected to know.

Andi


10. Algorithms (4th Edition)

๐Ÿšจ Ideal for: students
๐Ÿ’ฅ Major topics: data structures and algorithms

algorithms fourth edition book cover red

Algorithms takes a different approach than Grokking Algorithms and The Algorithm Design Manual. Instead of image-heavy examples, you’ll find detailed code teardowns.

Featuring 50 algorithms every programmer should know, you’ll work with data structures and algorithms for:

  • searching and sorting
  • graph processing
  • string processing

And more.

All implementations are presented in Java.

๐Ÿ’ก Algorithms also has two free companion courses: Algorithms Part I and Algorithms Part II.


11. Introduction to Algorithms

๐Ÿšจ Ideal for: students
๐Ÿ’ฅ Major topics: the role of algorithms

Introduction to Algorithms cover with line of maroon cartoon leaves

Similar to Algorithms, Introduction to Algorithms takes an academic approach to teaching algorithms.

While learning about the role of algorithms, you’ll also discover dynamic programming and edge-based flow. In addition, you’ll examine:

And beyond.

All algorithms are presented in pseudocode.

best algorithms books 5-star amazon review

This book is amazing.

J. Noor


12. Algorithms in a Nutshell: A Practical Guide

๐Ÿšจ Ideal for: students, programmers
๐Ÿ’ฅ Major topics: algorithm application, data structures

best algorithms books Algorithms in a Nutshell book cover with crab

Algorithms in a Nutshell is similar to Introduction to Algorithms as it focuses heavily on the role of algorithms.

In addition to learning algorithm design patterns, you’ll learn advanced data structures used to improve algorithm efficiency.

Algorithmic solutions are presented in C++, C, Java and Python.

best algorithms books 5-star review by C. L. Beard

Simply one of the best books on algorithms you will ever find.

C. L. Beard, Customer


13. 40 Algorithms Every Programmer Should Know

๐Ÿšจ Ideal for: beginner and experienced programmers
๐Ÿ’ฅ Major topics: algorithm design techniques, algorithm implementation

FANG interview prep book 40 algorithms every programmer should know with wood rings

40 Algorithms Every Programmer Should Know follows in the footsteps of Algorithms in a Nutshell and Introduction to Algorithms.

You’ll start to learn algorithms by discovering algorithm design techniques. Then you’ll discover how to implement different algorithms like sorting and searching.

Finally, you’ll learn about linear programming and working with machine learning algorithms.

You’ll do all this with real-world examples such as movie recommendation engines and weather prediction.


Learn Algorithms: Conclusion

Today we looked at the best ways to learn algorithms including:

๐Ÿ”ฅBest Course ๐Ÿ”ฅ
AlgoExpert

๐Ÿ’ฅ Best Book ๐Ÿ’ฅ
The Algorithm Design Manual

So whether you prefer books or courses, peep this list for the best way to learn algorithms this year.


Up Next:


  1. Where is the best place to learn algorithms?

    While there are plenty of places to learn algorithms, we think courses and books are the way to go. Our favorite course to learn algorithms is AlgoExpert. And for books, we enjoyed The Algorithm Design Manual.

  2. Is Algorithms in a Nutshell a good book?

    We think Algorithms in a Nutshell is worth investing in if you want to learn algorithms. In addition to learning algorithm design patterns, you’ll learn advanced data structures used to improve algorithm efficiency. Algorithmic solutions are presented in C++, C, Java and Python.

  3. Do you need to know data structures to learn algorithms?

    Data structures and algorithms go hand in hand, which is why you’ll find many resources that focus on teaching you both. You absolutely must learn data structures if you want to learn algorithms.