← All topics
Data Structures & Algorithms
DSA from zero to interview-ready: complexity, arrays, two pointers, sliding window, binary search, linked lists, stacks, recursion, trees, graphs, DP and more — explained simply with code in Python and Java.
- 01Time & Space Complexity (Big-O) — Explained SimplyBig-O made simple — how to measure an algorithm's speed and memory, with examples you will meet in every coding interview.
- 02Arrays & Hashing — The Patterns Behind Most Interview QuestionsFrequency counting, "seen before" sets, the complement trick behind Two Sum, and prefix sums — the four patterns that solve most array questions.
- 03Two Pointers — Solve Array Problems in One PassTwo indices moving through an array can replace a nested loop. Learn opposite-end pointers, fast/slow pointers and in-place tricks with clear dry runs.
- 04Sliding Window — Subarray and Substring Problems Made EasyFixed and variable-size windows for "longest/shortest subarray or substring" questions — one template, many problems.
- 05Binary Search — Classic Search and "Binary Search on the Answer"Halve the search space every step. The safe template, first/last occurrence, rotated arrays, and the powerful "binary search on the answer" pattern.
- 06Strings in DSA — Palindromes, Reversals and Pattern TricksHow strings really work in Python and Java, why naive concatenation is slow, and the core techniques — two pointers, counting, expand-around-center.
- 07Linked Lists — Reverse, Merge, and the Fast & Slow Pointer TrickNodes and pointers explained visually, then the five techniques that solve almost every linked-list question — dummy node, reversal, fast & slow pointers, merge and two-pass.
- 08Stack & Queue — Valid Parentheses, Monotonic Stack and MoreLIFO vs FIFO, the matching-brackets pattern, and the monotonic stack that finds the "next greater element" for every item in O(n).
- 09Recursion & Backtracking — Subsets, Permutations and the Choose–Explore–Unchoose TemplateUnderstand recursion with the call stack, then learn the one backtracking template that generates subsets, permutations, combinations and solves N-Queens.
- 10Binary Trees & BST — Traversals, DFS, BFS and the Recursive MindsetInorder, preorder, postorder and level order; height, diameter, LCA and BST validation — with one simple recursive pattern behind them all.
- 11Heaps & Priority Queues — Top K, Kth Largest and Running MedianWhat a heap is, how to use it in Python and Java, and the patterns it unlocks — Top K, Kth largest, merging sorted lists and the two-heap median.
- 12Graphs — BFS, DFS, Topological Sort, Union-Find and DijkstraHow to represent graphs, traverse them with BFS and DFS, count islands in a grid, detect cycles, order tasks with topological sort, and find shortest paths.
- 13Dynamic Programming — From Recursion to Memoization to TabulationDP demystified in 4 steps. Climbing Stairs, House Robber, Coin Change, LIS, LCS and 0/1 Knapsack — how to find the state, the recurrence and the base case.
- 14Greedy Algorithms — When the Best Local Choice WinsHow greedy algorithms work, how to tell when they're correct, and the classic patterns — interval scheduling, jump game, gas station and partition labels.
- 15Bit Manipulation — XOR Tricks, Counting Bits and Powers of TwoBinary, bitwise operators and the handful of tricks interviewers love — XOR to find the single number, n & (n − 1), counting set bits and checking powers of two.