Course · Interview foundations
DSA
DSA rounds in Data Engineering interviews are usually easy to medium problems on arrays, hashing, strings, two pointers and sliding windows, sometimes graphs or DP.
- Lessons
- 16
- Interview questions
- 249
- Projects & case studies
- 0
- Reading time
- ~5 h
Your progress
Saved in this browser onlyCourse structure
- 1 lessonStart hereThe complete overview of the course in one read.
- 4 lessonsBeginnerCore concepts you will use every day.
- 8 lessonsIntermediatePatterns used in production pipelines.
- 3 lessonsAdvancedPerformance, internals and edge cases.
Practise
Practice
249 problems in 17 topics, from basic to advanced. 0 of 249 done.
Arrays0/20
Pattern lesson: Arrays and Hashing: Sets, Hash Maps, Prefix Sums and Intervals
Array Basics1
Prefix Sum6
- Find Pivot IndexEasyLeetCode (opens in a new tab)
- Product of Array Except SelfMediumLeetCode (opens in a new tab)
- Subarray Sum Equals KMediumLeetCode (opens in a new tab)
- Subarray Sums Divisible by KMediumLeetCode (opens in a new tab)
- Contiguous ArrayMediumLeetCode (opens in a new tab)
- Shortest Subarray with Sum at Least KHardLeetCode (opens in a new tab)
Kadane's Algorithm5
- Maximum SubarrayMediumLeetCode (opens in a new tab)
- Maximum Product SubarrayMediumLeetCode (opens in a new tab)
- Maximum Subarray Sum with One DeletionMediumLeetCode (opens in a new tab)
- Maximum Absolute Sum of Any SubarrayMediumLeetCode (opens in a new tab)
- Maximum Sum Circular SubarrayMediumLeetCode (opens in a new tab)
Matrix3
Cyclic Sort5
Hashing0/9
Pattern lesson: Arrays and Hashing: Sets, Hash Maps, Prefix Sums and Intervals
- Contains DuplicateEasyLeetCode (opens in a new tab)
- Valid AnagramEasyLeetCode (opens in a new tab)
- Two SumEasyLeetCode (opens in a new tab)
- First Unique Character in a StringEasyLeetCode (opens in a new tab)
- Longest PalindromeEasyLeetCode (opens in a new tab)
- Ransom NoteEasyLeetCode (opens in a new tab)
- Valid SudokuMediumLeetCode (opens in a new tab)
- Group AnagramsMediumLeetCode (opens in a new tab)
- Longest Consecutive SequenceMediumLeetCode (opens in a new tab)
Bit Manipulation0/7
Pattern lesson: Arrays and Hashing: Sets, Hash Maps, Prefix Sums and Intervals
- Number of 1 BitsEasyLeetCode (opens in a new tab)
- Reverse BitsEasyLeetCode (opens in a new tab)
- Single NumberEasyLeetCode (opens in a new tab)
- Counting BitsEasyLeetCode (opens in a new tab)
- Complement of Base 10 IntegerEasyLeetCode (opens in a new tab)
- Sum of Two IntegersMediumLeetCode (opens in a new tab)
- Single Number IIIMediumLeetCode (opens in a new tab)
Two Pointers0/17
Pattern lesson: Two Pointers: Converging, Read-Write and Partitioning Templates
- Valid Palindrome IIEasyLeetCode (opens in a new tab)
- Valid PalindromeEasyLeetCode (opens in a new tab)
- Move ZeroesEasyLeetCode (opens in a new tab)
- Remove Duplicates from Sorted ArrayEasyLeetCode (opens in a new tab)
- Squares of a Sorted ArrayEasyLeetCode (opens in a new tab)
- Segregate 0s and 1sEasyGeeksforGeeks (opens in a new tab)
- Backspace String CompareEasyLeetCode (opens in a new tab)
- Two Sum IIMediumLeetCode (opens in a new tab)
- 3SumMediumLeetCode (opens in a new tab)
- Container With Most WaterMediumLeetCode (opens in a new tab)
- Sort ColorsMediumLeetCode (opens in a new tab)
- 3Sum ClosestMediumLeetCode (opens in a new tab)
- Triplets with Smaller SumMediumGeeksforGeeks (opens in a new tab)
- Subarray Product Less Than KMediumLeetCode (opens in a new tab)
- 4SumMediumLeetCode (opens in a new tab)
- Shortest Unsorted Continuous SubarrayMediumLeetCode (opens in a new tab)
- Trapping Rain WaterHardLeetCode (opens in a new tab)
Sliding Window0/14
Pattern lesson: Sliding Window: Fixed, Variable and Monotonic-Deque Templates
- Best Time to Buy and Sell StockEasyLeetCode (opens in a new tab)
- Maximum Average Subarray IEasyLeetCode (opens in a new tab)
- Max Sum Subarray of Size KEasyGeeksforGeeks (opens in a new tab)
- Longest Substring Without Repeating CharactersMediumLeetCode (opens in a new tab)
- Longest Repeating Character ReplacementMediumLeetCode (opens in a new tab)
- Permutation in StringMediumLeetCode (opens in a new tab)
- Minimum Size Subarray SumMediumLeetCode (opens in a new tab)
- Longest K Unique Characters SubstringMediumGeeksforGeeks (opens in a new tab)
- Fruit Into BasketsMediumLeetCode (opens in a new tab)
- Max Consecutive Ones IIIMediumLeetCode (opens in a new tab)
- Find All Anagrams in a StringMediumLeetCode (opens in a new tab)
- Minimum Window SubstringHardLeetCode (opens in a new tab)
- Sliding Window MaximumHardLeetCode (opens in a new tab)
- Substring with Concatenation of All WordsHardLeetCode (opens in a new tab)
Stack0/14
Pattern lesson: Stacks: Matching, Evaluation and Monotonic Stack Templates
Stack Basics6
- Valid ParenthesesEasyLeetCode (opens in a new tab)
- Remove All Adjacent Duplicates In StringEasyLeetCode (opens in a new tab)
- Min StackMediumLeetCode (opens in a new tab)
- Evaluate Reverse Polish NotationMediumLeetCode (opens in a new tab)
- Remove All Adjacent Duplicates in String IIMediumLeetCode (opens in a new tab)
- Simplify PathMediumLeetCode (opens in a new tab)
Monotonic Stack8
- Next Greater Element IEasyLeetCode (opens in a new tab)
- Daily TemperaturesMediumLeetCode (opens in a new tab)
- Car FleetMediumLeetCode (opens in a new tab)
- Next Greater Element IIMediumLeetCode (opens in a new tab)
- Remove Nodes From Linked ListMediumLeetCode (opens in a new tab)
- Remove K DigitsMediumLeetCode (opens in a new tab)
- 132 PatternMediumLeetCode (opens in a new tab)
- Largest Rectangle in HistogramHardLeetCode (opens in a new tab)
Binary Search0/20
Pattern lesson: Binary Search: Exact Match, Boundaries and Searching the Answer
Classic Binary Search6
- Binary SearchEasyLeetCode (opens in a new tab)
- Ceil in Sorted ArrayEasyGeeksforGeeks (opens in a new tab)
- Time Based Key-Value StoreMediumLeetCode (opens in a new tab)
- Find First and Last Position of a ValueMediumLeetCode (opens in a new tab)
- Number of OccurrenceMediumGeeksforGeeks (opens in a new tab)
- Median of Two Sorted ArraysHardLeetCode (opens in a new tab)
Rotated Arrays and Peaks5
- Find Rotation CountEasyGeeksforGeeks (opens in a new tab)
- Find Minimum in Rotated Sorted ArrayMediumLeetCode (opens in a new tab)
- Search in Rotated Sorted ArrayMediumLeetCode (opens in a new tab)
- Peak Index in a Mountain ArrayMediumLeetCode (opens in a new tab)
- Find Peak ElementMediumLeetCode (opens in a new tab)
Binary Search on the Answer6
- Koko Eating BananasMediumLeetCode (opens in a new tab)
- Minimum Number of Days to Make m BouquetsMediumLeetCode (opens in a new tab)
- Aggressive CowsMediumGeeksforGeeks (opens in a new tab)
- Maximum Candies Allocated to K ChildrenMediumLeetCode (opens in a new tab)
- Capacity To Ship Packages Within D DaysMediumLeetCode (opens in a new tab)
- Split Array Largest SumHardLeetCode (opens in a new tab)
Matrix Search3
Linked List0/18
Pattern lesson: Linked Lists: Pointer Rewiring, Fast and Slow Pointers, LRU Cache
Linked List Basics5
Fast and Slow Pointers8
- Linked List CycleEasyLeetCode (opens in a new tab)
- Happy NumberEasyLeetCode (opens in a new tab)
- Middle of the Linked ListEasyLeetCode (opens in a new tab)
- Palindrome Linked ListEasyLeetCode (opens in a new tab)
- Reorder ListMediumLeetCode (opens in a new tab)
- Find the Duplicate NumberMediumLeetCode (opens in a new tab)
- Linked List Cycle IIMediumLeetCode (opens in a new tab)
- Circular Array LoopMediumLeetCode (opens in a new tab)
In-place Reversal5
Trees0/18
Pattern lesson: Binary Trees and Tries: DFS, BFS and Prefix Search Templates
Tree DFS11
- Invert Binary TreeEasyLeetCode (opens in a new tab)
- Maximum Depth of Binary TreeEasyLeetCode (opens in a new tab)
- Diameter of Binary TreeEasyLeetCode (opens in a new tab)
- Balanced Binary TreeEasyLeetCode (opens in a new tab)
- Same TreeEasyLeetCode (opens in a new tab)
- Subtree of Another TreeEasyLeetCode (opens in a new tab)
- Count Good Nodes in Binary TreeMediumLeetCode (opens in a new tab)
- Construct Binary Tree from Preorder and Inorder TraversalMediumLeetCode (opens in a new tab)
- Lowest Common Ancestor of a Binary TreeMediumLeetCode (opens in a new tab)
- Binary Tree Maximum Path SumHardLeetCode (opens in a new tab)
- Serialize and Deserialize Binary TreeHardLeetCode (opens in a new tab)
Tree BFS2
Trie5
BST0/6
Pattern lesson: Binary Search Trees: Ordering, Validation, Insert and Delete
- Convert Sorted Array to BSTEasyLeetCode (opens in a new tab)
- Validate Binary Search TreeMediumLeetCode (opens in a new tab)
- Kth Smallest Element in a BSTMediumLeetCode (opens in a new tab)
- Lowest Common Ancestor of a BSTMediumLeetCode (opens in a new tab)
- Insert into a BSTMediumLeetCode (opens in a new tab)
- Delete Node in a BSTMediumLeetCode (opens in a new tab)
Heap0/18
Pattern lesson: Heaps and Priority Queues: Top-K, Scheduling and Running Medians
Top K Elements11
- Kth Largest Element in a StreamEasyLeetCode (opens in a new tab)
- Last Stone WeightEasyLeetCode (opens in a new tab)
- Top K Frequent ElementsMediumLeetCode (opens in a new tab)
- K Closest Points to OriginMediumLeetCode (opens in a new tab)
- Kth Largest Element in an ArrayMediumLeetCode (opens in a new tab)
- Task SchedulerMediumLeetCode (opens in a new tab)
- Min Cost to Connect RopesMediumGeeksforGeeks (opens in a new tab)
- Sort Characters By FrequencyMediumLeetCode (opens in a new tab)
- Find K Closest ElementsMediumLeetCode (opens in a new tab)
- Reorganize StringMediumLeetCode (opens in a new tab)
- Maximum Frequency StackHardLeetCode (opens in a new tab)
Two Heaps4
K-way Merge3
Greedy0/17
Pattern lesson: Greedy Algorithms and Intervals: Safe Local Choices and Sweeps
Greedy Choices10
- Jump GameMediumLeetCode (opens in a new tab)
- Jump Game IIMediumLeetCode (opens in a new tab)
- Gas StationMediumLeetCode (opens in a new tab)
- Hand of StraightsMediumLeetCode (opens in a new tab)
- Merge Triplets to Form TargetMediumLeetCode (opens in a new tab)
- Partition LabelsMediumLeetCode (opens in a new tab)
- Valid Parenthesis StringMediumLeetCode (opens in a new tab)
- Maximum Length of Pair ChainMediumLeetCode (opens in a new tab)
- Minimum Add to Make Parentheses ValidMediumLeetCode (opens in a new tab)
- Remove Duplicate LettersMediumLeetCode (opens in a new tab)
Intervals7
- Meeting RoomsEasyGeeksforGeeks (opens in a new tab)
- Merge IntervalsMediumLeetCode (opens in a new tab)
- Insert IntervalMediumLeetCode (opens in a new tab)
- Non-overlapping IntervalsMediumLeetCode (opens in a new tab)
- Interval List IntersectionsMediumLeetCode (opens in a new tab)
- Meeting Rooms IIMediumGeeksforGeeks (opens in a new tab)
- My Calendar IMediumLeetCode (opens in a new tab)
Backtracking0/12
Pattern lesson: Backtracking: Subsets, Combinations, Permutations and Grid Search
Subsets and Permutations6
- Generate ParenthesesMediumLeetCode (opens in a new tab)
- SubsetsMediumLeetCode (opens in a new tab)
- PermutationsMediumLeetCode (opens in a new tab)
- Subsets IIMediumLeetCode (opens in a new tab)
- Letter Combinations of a Phone NumberMediumLeetCode (opens in a new tab)
- Letter Case PermutationMediumLeetCode (opens in a new tab)
Combinations and Search6
Graph0/27
Pattern lesson: Graphs: BFS, DFS, Topological Sort, Union-Find and Shortest Paths
Graph Traversal5
Islands (Matrix Traversal)8
- Flood FillEasyLeetCode (opens in a new tab)
- Island PerimeterEasyLeetCode (opens in a new tab)
- Number of IslandsMediumLeetCode (opens in a new tab)
- Max Area of IslandMediumLeetCode (opens in a new tab)
- Pacific Atlantic Water FlowMediumLeetCode (opens in a new tab)
- Surrounded RegionsMediumLeetCode (opens in a new tab)
- Rotting OrangesMediumLeetCode (opens in a new tab)
- Number of Closed IslandsMediumLeetCode (opens in a new tab)
Topological Sort5
Union Find5
- Graph Valid TreeMediumGeeksforGeeks (opens in a new tab)
- Number of Connected Components in an Undirected Graph with Union-FindMediumGeeksforGeeks (opens in a new tab)
- Redundant ConnectionMediumLeetCode (opens in a new tab)
- Is Graph Bipartite?MediumLeetCode (opens in a new tab)
- Path With Minimum EffortMediumLeetCode (opens in a new tab)
Shortest Paths and MST4
Dynamic Programming0/24
Pattern lesson: Dynamic Programming: States, Transitions and the Classic DP Families
1D DP9
- Climbing StairsEasyLeetCode (opens in a new tab)
- Min Cost Climbing StairsEasyLeetCode (opens in a new tab)
- House RobberMediumLeetCode (opens in a new tab)
- House Robber IIMediumLeetCode (opens in a new tab)
- Decode WaysMediumLeetCode (opens in a new tab)
- Coin ChangeMediumLeetCode (opens in a new tab)
- Word BreakMediumLeetCode (opens in a new tab)
- Longest Increasing SubsequenceMediumLeetCode (opens in a new tab)
- Best Time to Buy and Sell Stock with CooldownMediumLeetCode (opens in a new tab)
Knapsack7
- Partition Equal Subset SumMediumLeetCode (opens in a new tab)
- Coin Change IIMediumLeetCode (opens in a new tab)
- Target SumMediumLeetCode (opens in a new tab)
- 0 - 1 Knapsack ProblemMediumGeeksforGeeks (opens in a new tab)
- Subset Sum ProblemMediumGeeksforGeeks (opens in a new tab)
- Count Subsets with SumMediumGeeksforGeeks (opens in a new tab)
- Partition Into 2 Subsets with Min Sum DiffHardGeeksforGeeks (opens in a new tab)
2D DP: Strings and Grids8
- Longest Palindromic SubstringMediumLeetCode (opens in a new tab)
- Palindromic SubstringsMediumLeetCode (opens in a new tab)
- Unique PathsMediumLeetCode (opens in a new tab)
- Longest Common SubsequenceMediumLeetCode (opens in a new tab)
- Interleaving StringMediumLeetCode (opens in a new tab)
- Edit DistanceMediumLeetCode (opens in a new tab)
- Burst BalloonsHardLeetCode (opens in a new tab)
- Regular Expression MatchingHardLeetCode (opens in a new tab)
Ticks are saved in this browser only and match the ticks on the interview pages.
Lessons
Work through the lessons in order. Completed lessons show a tick; lessons you have opened are outlined.
Start here
The complete overview of the course in one read.
Beginner
Core concepts you will use every day.
- Arrays and Hashing: Sets, Hash Maps, Prefix Sums and IntervalsThe most common coding-interview pattern: seen sets, value-to-index maps, counting, prefix sums, Kadane, intervals, matrices and bit tricks, with tested Python.
- Strings for Coding Interviews: Immutability, Scanning and ParsingHow Python strings work, the scanning and parsing templates behind string problems, and how they map to cleaning keys and parsing messy fields in pipelines.
- Two Pointers: Converging, Read-Write and Partitioning TemplatesUse two indices to replace nested loops: converging pointers on sorted data, read-write compaction, three-way partitioning, and the sort-merge join behind them.
- Queues: FIFO Buffers, Ring Buffers and Queue Design ProblemsHow queues work, deque versus list, building queues from stacks and a ring buffer, time-window counters, and the buffering ideas behind message queues and Kafka.
Intermediate
Patterns used in production pipelines.
- Sliding Window: Fixed, Variable and Monotonic-Deque TemplatesSolve contiguous subarray and substring problems in one pass with fixed and variable windows and a monotonic deque, and see how they power streaming metrics.
- Stacks: Matching, Evaluation and Monotonic Stack TemplatesUse Python lists as stacks for bracket matching, expression evaluation, min-tracking and monotonic stacks, with tested code and the pipeline jobs they map to.
- Binary Search: Exact Match, Boundaries and Searching the AnswerOne reliable binary search template for exact matches, first and last positions, rotated arrays and searching on the answer, plus as-of lookups and partition pruning.
- Linked Lists: Pointer Rewiring, Fast and Slow Pointers, LRU CacheReverse, merge, split and reorder linked lists safely with dummy nodes and fast and slow pointers, then build an LRU cache and a k-way merge in Python.
- Binary Trees and Tries: DFS, BFS and Prefix Search TemplatesTraverse binary trees with recursive and iterative DFS and level-order BFS, return values up the tree, build and serialise trees, and use tries for prefix search.
- Binary Search Trees: Ordering, Validation, Insert and DeleteUse the BST ordering rule to search, validate, insert, delete and find the k-th smallest value, and see how the same idea underlies B-tree indexes and range scans.
- Heaps and Priority Queues: Top-K, Scheduling and Running MediansUse Python's heapq for top-K, k-th largest, k-way merges, task scheduling and running medians, with the bounded-memory streaming patterns Data Engineers rely on.
- Greedy Algorithms and Intervals: Safe Local Choices and SweepsWhen a locally best choice is provably safe: reach, gas station, grouping and partition problems, plus interval sweeps used for sessionisation and time ranges.
Advanced
Performance, internals and edge cases.
- Backtracking: Subsets, Combinations, Permutations and Grid SearchOne choose-explore-unchoose template for subsets, combinations, permutations, partitions, word search and N-Queens, with duplicate handling, pruning and itertools.
- Graphs: BFS, DFS, Topological Sort, Union-Find and Shortest PathsModel problems as graphs and solve them with grid DFS and BFS, topological sort for DAG dependencies, union-find, Dijkstra, Bellman-Ford and minimum spanning trees.
- Dynamic Programming: States, Transitions and the Classic DP FamiliesA repeatable method for dynamic programming: define the state and transition, pick memoisation or a table, then solve 1D, grid, string and knapsack problems.
Resources
Related courses
- PythonPython glues pipelines together: ingestion, validation, orchestration and PySpark jobs. Focus on functions, generators, error handling and testable code.
- SQLSQL is the core language of data work: querying, transforming and modelling data in warehouses, lakehouses and Spark. Start here before any other tool.

