Algorithms

Core algorithms for coding interviews. Most topics are expanded to SDE-3 level: concept overview, core algorithms, pattern recognition, interview strategy, and quick revision.

Topic files

Topic
File
Highlights

Searching & Binary Search

Standard BS, lower/upper bound, BS on answer, rotated array, peak.

Sorting

Big-O table (merge, quick, heap, counting, radix), QuickSelect, custom comparators.

Divide and Conquer

Merge sort, quick sort, Master Theorem; D&C vs DP.

Mathematics

Primes, GCD/LCM, modular arithmetic, combinatorics; common problems.

String

KMP, Rabin-Karp, longest palindromic substring, sliding window, LCS/edit distance.

Bit Manipulation

Operators, tricks, bitmask DP, XOR, subset enumeration.

Greedy

Proof techniques, intervals, scheduling, jump game, candy.

Backtracking

Template, pruning, permutations/combinations, N-Queens, Word Search.

Graph

BFS, DFS, Dijkstra, Bellman-Ford, topo sort, Kruskal; pattern recognition, strategy.

Union Find

DSU with path compression and rank; Kruskal, connectivity.

Dynamic Programming

State, recurrence, top-down vs bottom-up; link to 16 patterns in patterns/dp-advanced.md.

Recursion

Base case, recursive step, types; memoization, backtracking.

Miscellaneous

Tips: categories, brute force, greedy, DP, maths, graph, debugging, edge cases.

Supplementary (same folder)

File
Description

DP from Aditya Verma style: 0/1 knapsack, recursive tree.

Recursion: IP/OP, decision tree, hypothesis/induction.

How to use

Last updated