Programming Topics
Everything you need to master competitive programming, algorithms, and software engineering. Explore topics to find definitions, tutorials, related study chapters, and courses.
Competitive Programming
Master contest strategy, problem-solving patterns, and the techniques that win rated competitions on Codeforces, LeetCode, and ICPC.
Dynamic Programming
Learn dynamic programming from foundations to advanced techniques: state design, transitions, knapsack, bitmask DP, and optimization.
Graphs & Graph Algorithms
Graph representation, DFS, BFS, Dijkstra's algorithm, MST, topological sort, cycle detection, and tree algorithms explained with C++ code.
Data Structures
Arrays, vectors, sets, maps, stacks, queues, priority queues, Fenwick trees, segment trees, and DSU — when to use each and why.
Algorithms
Sorting, searching, binary search, two pointers, sliding window, prefix sums, greedy, and divide-and-conquer algorithms with complexity analysis.
C++ for Competitive Programming
Modern C++ fundamentals: I/O, STL containers, iterators, lambdas, structured bindings, and the features that make C++ the language of competitive programming.
Binary Search
Binary search on sorted arrays and answer spaces — the technique that turns O(n) into O(log n). Boundary handling, STL functions, and practice problems.
Greedy Algorithms
The greedy paradigm: when local optima lead to global optima. Sorting-based greedy, interval scheduling, exchange arguments, and constructive problems.
Number Theory & Modular Arithmetic
Divisibility, GCD, LCM, primes, sieve of Eratosthenes, modular arithmetic, binary exponentiation, and combinatorics for programming contests.
Bit Manipulation
Bitwise operators, XOR properties, bitmask enumeration, and subset iteration — the low-level tricks that unlock elegant solutions.
Two Pointers & Sliding Window
Two pointers (opposite and same direction) and sliding window (fixed and variable size) — the O(n) patterns that replace brute force.
Segment Tree & Fenwick Tree
Range query data structures: Fenwick tree (BIT) for prefix operations, segment tree for arbitrary range queries and updates in O(log n).
String Algorithms & Hashing
Polynomial rolling hashing, trie (prefix tree), string matching, and character operations for competitive programming.
Tree Algorithms
Rooted trees, DFS on trees, subtree size, tree diameter, binary lifting, LCA, and Euler tour — the tree techniques that appear in every contest.
Complexity Analysis
Time and space complexity: Big-O notation, amortized analysis, and the skill of reading constraints to choose the right algorithm.
Recursion & Backtracking
Recursive thinking, the call stack, backtracking templates, pruning, and meet-in-the-middle — from basics to advanced enumeration.
Sorting & Frequency Arrays
std::sort, custom comparators, lower_bound, upper_bound, next_permutation, and frequency counting techniques.
Prefix Sums & Difference Arrays
1D and 2D prefix sums, suffix aggregates, and difference arrays — the O(1) range query techniques every programmer should know.