Skip to main content

Introduction

What does this course contain?

The course is split up into 13 chapters. The bulk of the content is within chapters 2 - 11, each of which focuses on a data structure or algorithm:

  • Arrays and strings
  • Hashmaps and sets
  • Linked lists
  • Stacks and queues
  • Trees and graphs
  • Heaps
  • Greedy algorithms
  • Binary search
  • Backtracking
  • Dynamic programming

These are the most important and most common data structures and algorithms for coding interviews.

In each of these chapters, you can expect to find:

  1. Explanation of the data structure/algorithm, what it's good at doing, how it can be used to solve problems, and details behind implementation & time/space complexity. If it's a data structure, we will also talk about the interface and how to use it.
  2. Common patterns and tricks related to the data structure or algorithm.
  3. Several example walkthroughs of relevant problems to help illustrate the concepts supplemented with visual aids, concise explanations, and time/space complexity analysis.
  4. Precisely curated practice problems to help you build muscle memory with what you've learned.
  5. We also provide a list of bonus problems at the end of each chapter. These problems are optional but can be used to reinforce the ideas learned in each chapter.

The 12th chapter contains several useful tools that can be used moving forward. There are code templates for all common patterns, cheatsheets regarding time and space complexities, and a flowchart that can be used as a general guideline when trying to figure out what data structure or algorithm should be used. We will also break down the stages of a coding interview and what you should do at each stage. To demonstrate this advice, there are example FAANG mock interview videos.

The final chapter is a bonus chapter where we will look into a few more techniques that aren't common/broad enough to warrant their own chapter.

All content is original and exclusive to this course.

Who is this course for?

This course is designed to help everyone increase their skill and confidence in coding interviews. The explanations start small, so even if you have no experience with data structures and algorithms, you will be completely fine.

This course is perfect for you if you are someone who:

  • Wants to learn data structures and algorithms for the purpose of passing coding interviews
  • Is a beginner to algorithm problems and wants to build a good foundation
  • Is planning to start applying soon and wants to brush up
  • Is not a beginner but still wants to improve their skills in coding interviews

The only assumption is that you already know basic coding in a common language like Java, C++, Python, or JavaScript.

Do I need LeetCode premium?

Nope, everything in the course is available to non-premium users. In the course, there are many problems and official solutions that are normally available only to LeetCode premium members. However, once you unlock this course, all premium content associated with the course will also be unlocked for you, even if you don't have LeetCode premium.

Feature breakdown

  • 93+ walkthroughs of example problems. These problems are used to demonstrate common patterns, how to recognize them, and how to implement solutions. Explanations are beginner friendly and concise.

  • 67+ curated practice problems. These problems are precisely chosen and placed so that you can apply your learnings in each chapter. Solve these problems in LeetCode's integrated coding environment - the best way to learn is by doing.

  • 125+ visual aids. These range from animations to full videos walking through an algorithm. These visual aids are designed to help you quickly understand complicated concepts.

  • 12 quizzes. Each data structure or algorithm has a quiz at the end of the chapter to test your knowledge (the trees and graphs chapter has two quizzes, and the final chapter has a "final" quiz).

  • 137+ bonus problems. These high quality problems are handpicked by the author. While not mandatory, they can help you master the concepts taught in the course.

  • Lifetime access. Pay once and have access to the course and all benefits forever.

  • Continuous improvement. New walkthroughs, practice problems, and visual aids are continuously being added. As we receive feedback, we will also continuously add features and improve the overall quality and depth of the course.

  • An exclusive community. Access to a chat server where you can meet other course-takers and the course author. You can form study groups, organize mock interviews, and ask questions about the course, data structures and algorithms, or interviewing in general.

  • Integrated environment. Solve problems using LeetCode's coding environment which supports 19 different languages.

  • No setup required. Don't worry about IDEs or other programs. Everything is right here.

  • Introduction

    • Testimonials

    • Introduction to big O

    • Introduction to recursion

    • Notes before starting

  • Arrays and strings

    • Arrays and strings

    • Two pointers

    • Reverse String

    • Squares of a Sorted Array

    • Sliding window

    • Maximum Average Subarray I

    • Max Consecutive Ones III

    • Prefix sum

    • Running Sum of 1d Array

    • Minimum Value to Get Positive Step by Step Sum

    • K Radius Subarray Averages

    • More common patterns

    • Arrays and strings quiz

    • Bonus problems, arrays and strings

  • Hashing

    • Hashing

    • Checking for existence

      • Check if the Sentence Is Pangram

      • Missing Number

      • Counting Elements

      • Counting

      • Find Players With Zero or One Losses

      • Largest Unique Number

      • Maximum Number of Balloons

      • Contiguous Array

      • More hashing examples

      • Ransom Note

      • Jewels and Stones

      • Longest Substring Without Repeating Characters

      • Hashing quiz

      • Bonus problems, hashing

  • Linked lists

    • Linked lists

    • Fast and slow pointers

    • Middle of the Linked List

    • Remove Duplicates from Sorted List

    • Reversing a linked list

    • Reverse Linked List II

    • Linked list quiz

    • Bonus problems, linked lists

  • Stacks and queues

    • Stacks

    • String problems

    • Simplify Path

    • Make The String Great

    • Queues

    • Moving Average from Data Stream

    • Monotonic

    • Next Greater Element I

    • Online Stock Span

    • Stacks and queues quiz

    • Bonus problems, stacks and queues

  • Trees and graphs

    • Binary trees

    • Binary trees - DFS

    • Minimum Depth of Binary Tree

    • Maximum Difference Between Node and Ancestor

    • Diameter of Binary Tree

    • Binary trees - BFS

    • Deepest Leaves Sum

    • Binary Tree Zigzag Level Order Traversal

    • Binary search trees

    • Insert into a Binary Search Tree

    • Closest Binary Search Tree Value

    • Trees quiz

    • Graphs

    • Graphs - DFS

    • Find if Path Exists in Graph

    • Number of Connected Components in an Undirected Graph

    • Max Area of Island

    • Reachable Nodes With Restrictions

    • Graphs - BFS

    • Nearest Exit from Entrance in Maze

    • Snakes and Ladders

    • Implicit graphs

    • Minimum Genetic Mutation

    • Jump Game III

    • Detonate the Maximum Bombs

    • Word Ladder

    • Graphs quiz

    • Bonus problems, trees and graphs

  • Heaps

    • Heaps

    • Heap examples

    • Kth Largest Element in a Stream

    • Remove Stones to Minimize the Total

    • Minimum Cost to Connect Sticks

    • Top k

    • Kth Largest Element in an Array

    • K Closest Points to Origin

    • Heap quiz

    • Bonus problems, heaps

  • Greedy

    • Greedy algorithms

    • Example greedy problems

    • Maximum 69 Number

    • Maximum Units on a Truck

    • How Many Apples Can You Put into the Basket

    • Reduce Array Size to The Half

    • Greedy quiz

    • Bonus problems, greedy

  • Binary search

    • Binary Search

    • On arrays

    • Search Insert Position

    • Longest Subsequence With Limited Sum

    • On solution spaces

    • Find the Smallest Divisor Given a Threshold

    • Divide Chocolate

    • Split Array Largest Sum

    • Binary search quiz

    • Bonus problems, binary search

  • Backtracking

    • Backtracking

    • Generation

    • All Paths From Source to Target

    • Letter Combinations of a Phone Number

    • More constrained backtracking

    • Generate Parentheses

    • Numbers With Same Consecutive Differences

    • Combination Sum III

    • Backtracking quiz

    • Bonus problems, backtracking

  • Dynamic programming

    • Dynamic programming

    • Framework for DP

    • 1D problems

    • Climbing Stairs

    • Min Cost Climbing Stairs

    • Coin Change

    • Multi-dimensional problems

    • Best Time to Buy and Sell Stock with Transaction Fee

    • Best Time to Buy and Sell Stock with Cooldown

    • Matrix DP

    • Unique Paths II

    • Minimum Falling Path Sum

    • Dynamic programming quiz

    • Bonus problems, dynamic programming

  • Interviews and tools

    • Code templates

    • Stages of an interview

    • Cheatsheets

    • Mock interviews

  • Bonus

    • Difference array

    • Tries

    • Implement Trie (Prefix Tree)

    • Bit manipulation

    • Hamming Distance

    • Intervals

    • Insert Interval

    • Modular arithmetic

    • Dijkstra's

    • Cheapest Flights Within K Stops

    • Final quiz

    • Next steps