What This Module IS (And What It Is NOT)

DSA Is the Knowledge. Competitive Coding Is the Performance.

This Module IS

  • Speed training — solving the right way, fast, under time pressure
  • Pattern recognition — identifying the technique in 2 minutes, not 20
  • Contest strategy — time management, problem ordering, penalty avoidance
  • Platform mastery — Codeforces, LeetCode, AtCoder rating systems and optimal practice
  • Debugging under pressure — finding bugs in 3 minutes, not 30
  • Template and tooling setup — fast I/O, macros, pre-built snippets
  • The mental game — handling nerves, managing frustration, knowing when to skip

This Module Is NOT

  • Not a repeat of DSA — we don't reteach arrays, trees, graphs, or DP
  • Not teaching algorithms from scratch — prerequisite: DSA module completed
  • Not theory-heavy — it's 80% practice, 20% strategy instruction
  • Not just for "competitive programming enthusiasts" — every placement coding round IS a contest
Complete Syllabus

8 Modules. 48+ Topics. Speed + Strategy + Practice Volume.

Click any module to expand. This module is 80% doing and 20% learning. Every session includes a timed problem-solving component. The goal: by the end, students can solve 3 medium-difficulty problems in 60 minutes consistently.

01

⭐ Contest Ecosystem & Competitive Setup

The platforms, rating systems, templates, and tooling that every competitive programmer needs

1.1 Competitive Programming Platforms (2025–26)

Codeforces (Div 1–4 rounds, educational rounds, rating system). AtCoder (ABC/ARC/AGC — best for learning progression). LeetCode (weekly/biweekly contests, company-tagged problems). CodeChef (Starters, Long Challenge). HackerRank, HackerEarth. Which platform to focus on and why.

1.2 Rating Systems & Growth Strategy

Codeforces: Newbie → Pupil → Specialist → Expert → Candidate Master → Master. LeetCode: contest rating and percentile. How rating is calculated (Elo-based). Setting realistic targets: Specialist (1400+) in 3 months, Expert (1600+) in 6. Tracking progress with graphs.

1.3 Fast I/O & Contest Template

ios_base::sync_with_stdio(false), cin.tie(nullptr). #define shortcuts: ll, all(x), pb, mp. Multi-test-case template with solve(). Debug macros: #define dbg(x) cerr << #x << "=" << x. Pre-built snippets: modpow, gcd, sieve, DSU, segment tree. The template that saves 5 minutes per contest.

1.4 Compiler Flags & Local Setup

g++ -O2 -std=c++20 -Wall -Wextra. Address sanitizer (-fsanitize=address,undefined) for catching bugs locally. Setting up competitive programming in VS Code / Sublime with custom build-and-run shortcuts. Online judge quirks: SPOJ stack size, Codeforces time limits.

1.5 STL Mastery for Speed

The 10 STL constructs every contestant memorises: vector, pair, map, set, unordered_map, priority_queue (min-heap trick), stack, deque, bitset, __builtin_popcount. sort with custom comparator as lambda. lower_bound/upper_bound patterns. When to use set vs unordered_set (hash collision attacks).

1.6 Virtual Contests & Practice Methodology

Virtual contest mode on Codeforces/AtCoder — practice like it's real. The optimal practice loop: virtual contest → upsolve unsolved → read editorial → implement → tag weak topics. Why solving 5 problems in contest mode beats 20 problems untimed. Spaced repetition for algorithm recall.

Placement relevance: Every placement coding round uses the same format as competitive programming contests — timed, multi-problem, auto-evaluated. Students who've done 50+ virtual contests have an unfair advantage: they've been training speed and time management together, not just correctness.
02

Pattern Recognition & Problem Classification

The meta-skill: reading a problem and identifying the technique within 2 minutes

2.1 The 15 Core Problem Patterns

Two pointers, sliding window, binary search on answer, prefix sums, hash maps, sorting + greedy, BFS/DFS on grid, union-find, segment tree queries, DP (1D, 2D, bitmask), backtracking, math/number theory, string matching, interactive, constructive. Every problem maps to one (or a combination).

2.2 Keyword-to-Pattern Mapping

"Minimum/maximum" → binary search on answer or DP. "Count of subarrays" → prefix sum + hash. "Connected components" → DSU or DFS. "Lexicographically smallest" → greedy. "All permutations" → backtracking. "Shortest path" → BFS or Dijkstra. Building an instant-lookup mental index.

2.3 Constraint Analysis

n ≤ 20 → brute force / bitmask (2ⁿ). n ≤ 10⁴ → O(n²). n ≤ 10⁵ → O(n log n). n ≤ 10⁶ → O(n). n ≤ 10⁸ → O(n) or O(1). Reading constraints to eliminate impossible approaches BEFORE thinking about the problem. The fastest problem-solving shortcut.

2.4 Constructive Algorithm Problems

Problems where you BUILD a valid solution, not search for one. "Construct an array where..." "Find any permutation such that..." Pattern: work backwards, use parity/invariant arguments, exploit edge cases. A category Codeforces loves that DSA training rarely covers.

2.5 Interactive & Output-Only Problems

Interactive problems: query the judge, receive answers, deduce the hidden structure. "Guess the number in ≤ 20 queries" (binary search). "Find the hidden graph." I/O flush requirements. Output-only: generate solutions offline. Contest-specific formats students must know.

2.6 Ad-Hoc & Observation-Based Problems

Problems that don't fit standard patterns — require a unique observation or insight. Parity arguments, invariant identification, game simulation, pigeonhole principle. "If you can't find the pattern in 5 minutes, simulate small cases on paper." The skill of finding the trick.

Placement relevance: Pattern recognition speed determines interview outcomes. A student who recognises "this is a sliding window problem" in 30 seconds has 55 minutes to code and debug. A student who spends 20 minutes figuring out the approach has 40 minutes — and the pressure multiplies. This module builds the instant-recognition reflex.
03

Speed Coding & Implementation Mastery

Writing correct code FAST — the skill that separates contest performers from concept knowers

3.1 Clean Implementation Patterns

Consistent variable naming under pressure. Direction arrays for grid problems: int dx[]={0,0,1,-1}. Input reading patterns for various formats (graph, tree, matrix, queries). Output formatting. Writing modular code even in contests — because bugs in spaghetti code cost more time than writing clean code.

3.2 Common Implementation Pitfalls

Integer overflow (use long long for n > 46340). Off-by-one errors in binary search (lo < hi vs lo <= hi vs lo+1 < hi). Array index out of bounds. Forgetting to reset globals between test cases. Modular arithmetic mistakes. The 10 bugs that cause 80% of wrong answers.

3.3 Modular Arithmetic Toolkit

mod addition, subtraction (handle negatives!), multiplication. modpow (binary exponentiation). Modular inverse (Fermat for prime mod). nCr mod p using precomputed factorials and inverse factorials. The modular arithmetic template every contestant carries. MOD = 1e9+7 and MOD = 998244353.

3.4 Bit Manipulation Tricks for Speed

__builtin_popcount, __builtin_clz, __builtin_ctz. Iterating over all subsets of a bitmask. Checking if a bit is set: (mask >> i) & 1. Setting/clearing bits. XOR properties for toggling. Bitset for O(n/64) operations. The bit tricks that save 5 lines and prevent bugs.

3.5 Implementing Data Structures from Memory

Can you write a segment tree in 10 minutes without looking it up? DSU in 3 minutes? Trie in 5? BIT in 3? The contest test: if you can't implement it from memory, you can't use it under pressure. Drilling implementation speed for 8 core structures until they're muscle memory.

Placement relevance: Implementation speed determines whether you finish 3 problems or 2 in a 60-minute round. A student who can write a segment tree from memory in 10 minutes has 50 minutes for thinking. A student who needs 25 minutes to implement it correctly has 35 minutes — and usually makes a bug that costs more time.
04

Contest Problem Types — Easy/Medium Mastery

The problem categories that appear as problems A, B, C in Codeforces rounds — build speed on these first

4.1 Greedy Construction

Build the answer greedily: sort + sweep, priority queue selection, exchange arguments. "Prove your greedy works" — the informal proof skill. Activity selection, job scheduling, minimum platforms, reorganise string, partition labels. Speed target: solve in 8–12 minutes.

4.2 Sorting-Based Problems

Sort by one dimension, process by another. Meeting rooms, merge intervals, event scheduling, minimum arrows to burst balloons. Custom sort comparators. When sorting transforms O(n²) into O(n log n). Speed target: 5–10 minutes.

4.3 Two Pointers & Sliding Window Under Pressure

Not learning the technique (DSA covers that) — practising SPEED. Given a two-pointer problem, code the solution in under 8 minutes. 20+ timed drills on: pair sum, 3Sum, minimum window substring, longest without repeating. Speed is the goal, not understanding.

4.4 Binary Search Applications

Binary search on answer: minimum capacity, maximum minimum distance, split array largest sum. Binary search on sorted rotated array variants. Timed drills: identify binary search applicability in 1 minute, implement in 5. 15+ problems at speed.

4.5 Math & Number Theory in Contests

GCD/LCM applications, prime factorisation, sieve applications, Euler's totient in problems, combinatorics (nCr mod p), probability in contests. Recognising when a problem is "just math" — no complex data structure needed. Speed: recognise + implement in 10 minutes.

4.6 String Manipulation at Speed

Hashing for substring comparison. Palindrome detection variants. Character frequency-based problems. KMP/Z when exact matching is needed. Timed practice: solve common string contest problems in 8–12 minutes. Build the "string problem" pattern library.

Placement relevance: Easy/medium problems (Codeforces A/B/C difficulty, LeetCode Easy/Medium) are what placement coding rounds consist of. A student who solves 3 mediums in 60 minutes passes. A student who solves 1 hard in 60 minutes fails. Speed on medium-difficulty problems is more valuable than ability on hard problems for most placements.
05

Contest Problem Types — Hard Problem Patterns

Problems D, E, F in contests — the problems that gain rating points and crack top-tier interviews

5.1 Graph Modelling in Disguise

Many hard problems don't look like graph problems but ARE graph problems. "Transform word A to word B" = BFS on word graph. "Minimum cost to connect" = MST. "Dependency ordering" = topological sort. The skill: recognising when to MODEL the problem as a graph.

5.2 DP State Design Under Pressure

Not learning DP (DSA covers that) — practising DP STATE DESIGN at speed. Given a new problem, define dp[i][j] within 3 minutes. Recognise knapsack variants, interval DP, bitmask DP, digit DP triggers. 20+ timed DP problems. The skill: state definition speed.

5.3 Segment Tree & BIT Contest Problems

Range query problems in contests: identify when segment tree or BIT is needed. Implement from memory, apply to the problem, submit. Range update + range query, count inversions, merge sort tree applications. Speed: identify → implement → submit in 15 minutes.

5.4 Advanced Graph in Contests

Shortest path variants (Dijkstra with state), cycle detection in directed graphs (contest version), SCC applications (2-SAT reduction), Euler tour for subtree queries. Recognising which graph algorithm applies from the problem constraints.

5.5 Combinatorial & Counting Problems

Problems that ask "count the number of ways." Inclusion-exclusion, Burnside's lemma, Catalan number recognition, stars and bars, generating functions (conceptual). Modular arithmetic for large answers. The "counting" pattern that appears in 20%+ of hard problems.

Placement relevance: Hard problems (Codeforces D/E, LeetCode Hard) appear in Google, DE Shaw, Flipkart, and Goldman Sachs final rounds. The difference between a ₹12L offer and a ₹25L offer is often whether the candidate solved the hard problem. This module trains the skills that solve it.
06

Debugging & Stress Testing

Finding bugs in 3 minutes instead of 30 — the skill nobody teaches but everyone needs

6.1 Systematic Debugging Under Time Pressure

The debugging checklist (in order): array bounds → integer overflow → uninitialised variables → off-by-one → edge cases (n=1, n=0, all same) → wrong data type → wrong MOD. Running through this list in 2 minutes catches 90% of bugs. Don't think — check systematically.

6.2 Stress Testing

Write a brute-force solution (O(n²) or worse). Write a random test generator. Run both, compare outputs. If they differ — you have a counter-example. Automate with a bash script. The ONLY reliable way to find subtle bugs. Should be muscle memory: takes 5 minutes to set up.

6.3 Edge Case Catalogue

The 20 edge cases that catch contestants: empty input, single element, all elements same, all elements max value, sorted input, reverse-sorted, negative numbers, zero, large n with small values, small n with large values, disconnected graph, tree that's a line, tree that's a star. Always test these.

6.4 Reading Problem Statements Precisely

"At most K operations" vs "exactly K operations." "1-indexed" vs "0-indexed." "Distinct elements" vs "not necessarily distinct." "Connected graph" vs "not necessarily connected." The two words you missed that gave you WA. Reading skills are debugging skills.

Placement relevance: "My solution works on samples but fails on hidden test cases" — the most common placement coding round experience. Stress testing is the ONLY way to find the counter-example. Students who can stress-test debug 3x faster than students who stare at their code.
07

Contest Strategy & Mental Game

Time management, problem ordering, penalty optimisation, and handling pressure

7.1 Contest Time Management

Read ALL problems in the first 5 minutes. Estimate difficulty. Start with the easiest, not the first. Time budget per problem: Easy (10–15 min), Medium (15–25 min), Hard (25–40 min). If stuck for 5 minutes with no progress — SKIP and return. Never spend 40 minutes on one problem when 3 easier problems are unsolved.

7.2 The Penalty System & Submission Strategy

Codeforces: time penalty matters — submit early for higher score. LeetCode: wrong submissions don't penalise but waste time. ICPC: 20-minute penalty per wrong answer. Test locally before submitting. "One more test case" is worth 2 minutes to avoid a 20-minute penalty.

7.3 Handling Being Stuck

Step 1: Re-read the problem (you probably missed something). Step 2: Try small examples by hand. Step 3: Consider the constraint (what algorithm fits?). Step 4: Think about the OPPOSITE problem. Step 5: If still stuck after 5 minutes — skip, solve other problems, return with fresh eyes. Never panic-code.

7.4 Managing Contest Nerves

Pre-contest routine: open template, test compilation, breathe. During: focus on YOUR performance, not the leaderboard. After wrong answer: systematic debugging, not random changes. After a bad contest: upsolve, learn, don't dwell. The mental game is real — ignoring it is a competitive disadvantage.

7.5 Upsolving: Where Real Growth Happens

After every contest, solve the problems you COULDN'T solve during the contest. Read the editorial. Implement the solution. Add it to your problem archive. Tag it by technique. Growth formula: 50% contest + 50% upsolving. Students who only contest without upsolving plateau at Specialist.

Placement relevance: Every placement coding round is a contest with time pressure. Students who've been trained on time management, problem ordering, and "when to skip" outperform students who approach all 3 problems sequentially and get stuck on problem 1 for 40 minutes.
08

Live Contest Practice & Rating Progression

Structured weekly contest participation with upsolving, analysis, and rating trackings

8.1 Weekly Internal Contests

4–5 problems, 2 hours, rated internally. Problems curated by difficulty: 1 easy, 2 medium, 1 medium-hard, 1 hard. Leaderboard and rating tracked. Post-contest editorial session: trainer walks through optimal solutions for all problems. The backbone of the module.

8.2 Codeforces Virtual Contest Practice

Participate in past Codeforces rounds as virtual contests (timed, rated experience). Start with Div 3, progress to Div 2, then Div 1/Div 2 combined. Track virtual performance vs actual standings. The most effective practice format because it simulates real pressure.

8.3 LeetCode Weekly Contest Participation

Join live LeetCode Weekly and Biweekly contests. Company-relevant problem formats. Track contest rating progression. Compare solutions with top performers. LeetCode contest problems directly mirror placement coding round formats.

8.4 Problem Archive & Weak Topic Targeting

Maintain a personal problem archive: each solved problem tagged by technique, difficulty, and time taken. Identify weak techniques (e.g., "I solve graph problems slowly" or "I can't recognise DP state design"). Dedicate targeted practice sessions to weak areas. Review archive before contests.

8.5 Rating Milestones & Graduation

Target milestones: Codeforces Specialist (1400+) → Expert (1600+). LeetCode contest rating 1800+. Solving 3/4 problems consistently in Codeforces Div 2. Solving 3/4 in LeetCode weekly. 300+ problems solved total. These are the measurable outcomes that signal competitive coding fluency.

Placement relevance: Rating is a proxy for coding skill that some companies (Google, Flipkart, Tower Research) actually check. More importantly, the practice volume from 50+ contests builds the speed, accuracy, and composure that placement coding rounds test. A student who's done 50 contests treats a placement coding round as "just another contest."
Competitive Programming Ecosystem (2025–26)

The Platforms Students Train On

Codeforces

The gold standard. Rated rounds multiple times per week. Div 1–4 difficulty tiers. Largest competitive programming community globally. Best for: rating-based progression and contest experience.

Rated RoundsDiv 1–4EditorialsVirtual Contests

AtCoder

Japanese platform with exceptionally well-designed problems. ABC (beginner) → ARC → AGC progression. Cleanest problem statements. Best for: learning progression and mathematical/constructive problems

Rated RoundsDiv 1–4EditorialsVirtual Contests

LeetCode

Weekly and biweekly rated contests. Company-tagged problems for targeted placement prep. Most directly relevant to interview coding rounds. Best for: placement-specific practice and company-tagged drilling.

Weekly ContestsCompany TagsInterview Focus

CodeChef

Indian platform with Starters (rated short contests) and Long Challenge format. Strong Indian community. Cook-offs and Lunchtime rounds. Best for: Indian competitive programming community and beginner-friendly progression.

StartersIndian CommunityBeginner-Friendly

ICPC & Meta Hacker Cup

Team-based (ICPC) and individual (Meta Hacker Cup) premier contests. Multi-round elimination format. The pinnacle of competitive programming achievement. ICPC regionals are the target for top college teams.

ICPC RegionalsMeta Hacker CupTeam Contests

HackerRank & HackerEarth

Used by companies for hiring assessments. Many campus recruitment coding rounds run on these platforms. Best for: practising the exact platform students will encounter during placement drives.

Hiring ContestsCampus DrivesCompany Challenges
How We Deliver

80% Practice. 20% Strategy. 100% Under Time Pressure.

Live Problem-Solving Sessions

Trainers with Codeforces Expert/Master ratings solve contest problems live — showing the decision-making process, not just the solution. "I see n ≤ 10⁵, so O(n log n) works. This looks like a binary search on answer..."

Weekly Internal Contests

2-hour timed contests every week with 4–5 problems. Internal rating system. Post-contest editorial session. Leaderboard creates competition. This is the primary learning vehicle — not lectures.

Daily Timed Problem Sets

3 problems daily on the platform — solve all 3 in 45 minutes. Topic-rotated: Monday (greedy), Tuesday (DP), Wednesday (graphs), Thursday (strings), Friday (mixed). Speed is tracked and graphed.

Rating & Speed Analytics

Student dashboards: problems solved by topic, average time per difficulty, contest rating progression, weak technique identification. TPOs see: which students are contest-ready, which need more practice.

Practice Milestones

What Students Should Achieve

300+ Problems Solved

Across Codeforces, LeetCode, and the internal platform. Tagged by technique and difficulty."

Codeforces 1400+ Rating

Specialist level — solves problems A, B, C consistently in Div 2 rounds.

3 Mediums in 60 Minutes

Consistently solve 3 medium-difficulty problems within a 60-minute window.

8 Data Structures from Memor

Implement segment tree, BIT, DSU, trie, heap, graph (adj list), sparse table, and stack from memory in under 10 minutes each.

Pattern Recognition in 2 Minutes

Read a new problem statement and identify the primary technique within 2 minutes, 80%+ of the time.

50+ Contests Participated

Weekly internal contests + Codeforces virtual contests + LeetCode weekly. Upsolving done for each.

Why Competitive Coding Matters for Placements

Every Placement Coding Round IS a Competitive Programming Contest

Same Format: Timed, Multi-Problem, Auto-Evaluated

TCS, Infosys, Wipro, Google, Amazon — every company's coding round gives 2–4 problems in 45–90 minutes. This is literally a competitive programming contest. Students who've done 50+ contests treat placement rounds as routine. Students who haven't, panic.

Some Companies Check Ratings Directly

Google, Flipkart, Tower Research, DE Shaw, and several startups ask for Codeforces/LeetCode profiles during hiring. A Codeforces Specialist (1400+) or LeetCode Top 15% rating is a concrete, verifiable signal of coding ability that resumes can't fake.

Speed Beats Knowledge in Timed Rounds

A student who knows DP but takes 30 minutes to code a solution loses to a student who codes it in 12 minutes. Competitive coding training builds IMPLEMENTATION SPEED — the ability to translate a correct approach into correct code, fast. Speed is trainable. This module trains it.

Higher Rating = Higher Package

The correlation is direct: students who can solve 3/4 problems in a placement coding round get shortlisted for higher-package roles. Students who solve 1/4 get filtered to lower-package tracks. Competitive coding training is an investment in placement package outcomes.