Data Structures and Algorithms
Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
LeetCode's Interview Crash Course
Data Structures and Algorithms
Introduction
This is a data structures and algorithms (DSA) course with a strong focus on passing coding interviews for software engineering jobs.
Most DSA courses - including those offered in universities, tend to concentrate on theoretical concepts that don't matter in an interview.
Most of the time, these courses present zero or few examples of problems you would see in an interview.
This course takes a very pragmatic approach to teaching DSA.
The course is primarily taught through examples - it includes hundreds of carefully curated problems that show up in actual interviews.
These examples are delivered through a balanced mix of walkthroughs and exercises.
You will learn by doing.
Everything you need to pass coding interviews is here in one place.
We will not dwell on theoretical details or waste time on concepts that won't help you pass an interview.
The goal of this course is to get you a job, not pass an exam.
Regardless of your initial skill level, you should be comfortable with preparing for and passing coding interviews at tech companies after taking this course.
If your target is top-tier companies like FAANG, taking this course will set you up with all the fundamentals necessary to prepare for those interviews.
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:
- 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.
- Common patterns and tricks related to the data structure or algorithm.
- Several example walkthroughs of relevant problems to help illustrate the concepts supplemented with visual aids, concise explanations, and time/space complexity analysis.
- Precisely curated practice problems to help you build muscle memory with what you've learned.
- 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.
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.
Course Content Breakdown
Introduction Introduction
Arrays and Strings Arrays and Strings
Arrays and Strings
Arrays and stringsTwo pointersReverse StringSquares of a Sorted ArraySliding windowMaximum Average Subarray IMax Consecutive Ones IIIPrefix sumRunning Sum of 1d ArrayMinimum Value to Get Positive Step by Step SumK Radius Subarray AveragesMore common patternsArrays and strings quizBonus problems, arrays and strings
Hashing Hashing
Hashing
HashingChecking for existenceCheck if the Sentence Is PangramMissing NumberCounting ElementsCountingFind Players With Zero or One LossesLargest Unique NumberMaximum Number of BalloonsContiguous ArrayMore hashing examplesRansom NoteJewels and StonesLongest Substring Without Repeating CharactersHashing quizBonus problems, hashing
Linked Lists Linked Lists
Linked Lists
Stacks and Queues Stacks and Queues
Stacks and Queues
Trees and Graphs Trees and Graphs
Trees and Graphs
Binary treesBinary trees - DFSMinimum Depth of Binary TreeMaximum Difference Between Node and AncestorDiameter of Binary TreeBinary trees - BFSDeepest Leaves SumBinary Tree Zigzag Level Order TraversalBinary search treesInsert into a Binary Search TreeClosest Binary Search Tree ValueTrees quizGraphsGraphs - DFSFind if Path Exists in GraphNumber of Connected Components in an Undirected GraphMax Area of IslandReachable Nodes With RestrictionsGraphs - BFSNearest Exit from Entrance in MazeSnakes and LaddersImplicit graphsMinimum Genetic MutationJump Game IIIDetonate the Maximum BombsWord LadderGraphs quizBonus problems, trees and graphs
Heaps Heaps
Heaps
Greedy Greedy
Greedy
Binary Search Binary Search
Binary Search
Backtracking Backtracking
Backtracking
Dynamic Programming Dynamic Programming
Dynamic Programming
Dynamic programmingFramework for DP1D problemsClimbing StairsMin Cost Climbing StairsCoin ChangeMulti-dimensional problemsBest Time to Buy and Sell Stock with Transaction FeeBest Time to Buy and Sell Stock with CooldownMatrix DPUnique Paths IIMinimum Falling Path SumDynamic programming quizBonus problems, dynamic programming
Interviews and Tools Interviews and Tools
Interviews and Tools
Bonus Bonus