DeriveIt
Roadmap
Cheat Sheets
Premium
Data Structures
Arrays & HashMaps
The most basic Data Structures and when to use them.
1.
Array
Lesson
Reverse Array
Easy
Check Sorted Array
Easy
2.
String and Tuple
Lesson
Validate Palindrome
Easy
3.
Making the HashMap
Lesson
4.
HashMap and Set
Lesson
Contains Duplicate
Easy
Validate Anagrams
Easy
Group Anagrams
Medium
Objects
Create any Data Structure you can dream of. Here are the common ones.
5.
Arrays Store Pointers
Lesson
6.
Pointers
Lesson
Two Arrays
Easy
7.
Linked List
Lesson
Length of a Linked List
Easy
Reverse Linked List
Easy
Delete Nth Node
Easy
Delete Nth-to-Last Node
Easy
8.
Deque
Lesson
9.
Tree
Lesson
10.
Trie
Lesson
Implement a Trie
Medium
11.
Theory - Uniting Every Data Structure
Lesson
12.
Theory - Ordered Data Structures
Lesson
Python
Big O
Classes and Objects
Recursion
Recursion
Recursion is the best way to solve any problem. Just write the solution using itself.
1.
Using Recursion
+1
Lesson
Invert Tree
Easy
Clone Tree
Easy
Tree Height
Easy
Trees Equal
Easy
Tree Contains Subtree
Medium
Min Root to Leaf Length
Medium
Rightmost Leaf Location
Medium
2.
The Call Stack
Lesson
3.
Advanced Recursion
+1
Lesson
Height-Balanced Tree
Easy
Tree Diameter
Easy
Set Depth Times Height
Medium
Max Node to Leaf Sum
Medium
Max Node to Node Sum
Hard
Lowest Common Ancestor
Hard
DFS & BFS
All the standard ways of walking through Trees.
4.
Tree DFS
Lesson
Preorder Traversal
Easy
File Destroyer
Easy
Package Fever
Easy
Longest Increasing Stretch Downward
Medium
Traversal Order
Medium
Tree from Preorder and Inorder Traversal
Medium
5.
Iterative Tree DFS
+1
Lesson
Iterative Inorder Traversal
Medium
Iterative Postorder Traversal
Medium
6.
Tree BFS
Lesson
Breadth First Traversal
Medium
Layer with Max Sum
Medium
Tree Right Side View
Medium
Max Perfect Width of a Tree
Medium
Binary Search
Quickly search through sorted data in O(log n) time.
7.
Binary Search
Lesson
Lost Keys
Easy
Max Value Less Than
Easy
Min in a Rotated Sorted Array
Medium
Search a Rotated Sorted Array
Medium
8.
Binary Search Tree
Lesson
Convert Sorted Array to BST
Easy
Search a BST
Easy
Lowest Common Ancestor in a BST
Medium
Kth Smallest Element in a BST
Medium
Validate BST
Medium
Graphs
The same as Trees, but you need to avoid cycles.
9.
Graphs
+1
Lesson
Clone Graph
Medium
Number of Chocolate Chunks
Medium
Downhill Turtle Release
Medium
10.
Graph DFS
Lesson
11.
Graph BFS
Lesson
Is a Prerequisite
Medium
Dynamic Programming
Avoid making redundant calls in your recursion by storing past results.
12.
Dynamic Programming
Lesson
Staircase
Easy
Is Writable
Medium
Number of Interpretations
Medium
Coin Change
Medium
Coin Change Ways
Medium
New York Paths
Medium
Longest Common Subsequence
Medium
Edit Distance
Hard
Longest Increasing Subsequence
Medium
Merge Hay Bales
Hard
Balloon Game
Hard
13.
State-Based Dynamic Programming
+1
Lesson
Richest Landlord
Medium
Max Profit with 1 Trade
Easy
Max Profit with Cooldown
Easy
Max Profit with 2 Trades
Medium
Max Profit with k Trades
Hard
Backtracking
Avoid wasting time and space in your recursion by making the inputs global.
14.
Backtracking
Lesson
All Subsets
Medium
All Parentheses
Medium
All Phone Keyboard Interpretations
Medium
All Coin Change Ways
Medium
All Interpretations
Hard
N Queens
Hard
Solve Sudoku
Hard
Python
Data Structures
Classes and Objects
Iteration
Single Pass
Find a trick to do one pass - you can't do better than that!
1.
Stack
Lesson
Validate Parentheses
Easy
Number of Steps Until a Higher Step
Medium
Largest Rectangle
Hard
2.
Sliding Window
Lesson
Sliding Window Sum
Easy
Count Anagrams
Medium
3.
Growing Window
Lesson
Max Subarray Sum
Easy
Max Subarray Product
Medium
4.
Longest Sliding Window
Lesson
Longest No-Dupe Substring
Medium
Trick Problems
Problems that are just asking you to find the "trick". Many of these are Greedy algorithms.
5.
Sum Problems
Lesson
Two Sum
Easy
Three Sum
Medium
Three Sum Smaller
Medium
6.
Interval Problems
Lesson
Overlapping Intervals
Easy
Cancel Meetings
Hard
7.
Case Analysis Problems
+1
Lesson
Biggest Bucket
Medium
Pooling Rain Water
Medium
Pooling Rain Water 3D
Hard
Product Excluding Self
Hard
Faster Longest Increasing Subsequence
Hard
Heap
Heaps let you view smallest element quickly. Just like BSTs, they deal with sorted order, so think O(log n).
8.
Heap
Lesson
Kitchen Rush
Easy
K-Merge
Medium
Lightning Bolt Path
Medium
9.
Sorting
Lesson
Heap Sort
Easy
Merge
Medium
Merge Sort
Medium
Quick Sort
Hard
Counting Sort
Medium
10.
Kth Smallest Element
Lesson
K Smallest Elements
Medium
11.
Kth Smallest Element in a Data Stream
Lesson
Median in a Data Stream
Hard
Iterative Recursion
Here's how to implement any Recursion "without using Recursion".
12.
Converting Recursion to Iterative
+1
Lesson
Iterative Tree Height
Medium
Iterative Trees Equal
Medium
Iterative Graph DFS
Medium
Python
Data Structures
Bit Manipulation