Appearance
Chapter 11: Contest Craft
Overview
Knowing algorithms is necessary but not sufficient — you also need the practical meta-skills to deploy them under time pressure. This chapter covers everything around the algorithms: choosing the right data structure, deciding between DP and greedy, debugging when you're panicking, and planning your study progression. It also includes copy-paste-ready templates and cheatsheets. Come here when you want to level up your contest performance, not just your algorithmic knowledge.
Navigation
Coming from: Chapter 10 — Patterns and Recipes — meta-patterns for recognizing which technique to apply
Going to: Chapter 12 — Practice Ladders — structured practice from CF 1100 to 2100
Topics at a Glance
| # | Topic | Difficulty | Key Trigger Phrase |
|---|---|---|---|
| 01 | Codeforces Tips and Workflow | Intermediate | "How do I structure my contest strategy?" |
| 02 | Study Plan — CF 1100 → 2100 | Intermediate | "What should I study this week?" |
| 03 | Common C++ Templates | Intermediate | "Give me copy-paste-ready contest code" |
| 04 | STL Quick Reference | Beginner | "What's the syntax for lower_bound again?" |
| 05 | Complexity Cheatsheet | Beginner | "What's the complexity of this operation?" |
| 06 | Data Structure Selection Guide | Intermediate | "Which data structure handles range queries + point updates?" |
| 07 | DP vs Greedy Guide | Beginner | "Should I use DP or greedy here?" |
| 08 | BFS vs DFS Guide | Beginner | "Should I use BFS or DFS?" |
| 09 | Debugging Under Pressure | Intermediate | "Got WA and I'm panicking" |
| 10 | Reflections | Beginner | "I feel stuck and not improving" |
Appendices — drills, mock contests, and posters
| # | Topic | Use it for |
|---|---|---|
| 11 | Speed Drills | Timed implementation practice for common templates |
| 13 | Mistake Journal | Capture wrong submissions as data, not noise |
| 14 | Mock Contest 1 | Div 2 warm-up simulation |
| 15 | Mock Contest 2 | Technique diagnostic |
| 16 | Mock Contest 3 | Speed round |
| 17 | DS Selection Poster | One-page decision tree for data structures |
| 18 | DP Pattern Poster | One-page taxonomy of DP shapes |
| 19 | Graph Algorithm Poster | One-page graph algorithm map |
If You Only Read 3 Files
- Data Structure Selection Guide — because choosing the right data structure is half the battle. This decision matrix saves you from that agonizing "should I use a segment tree or a Fenwick tree?" moment during a contest.
- Debugging Under Pressure — because WA on test 5 with 30 minutes left is the most stressful moment in CP, and having a systematic debugging protocol (instead of randomly changing things) can save your rating.
- Study Plan — because undirected practice is the #1 reason people plateau. This 32-week roadmap gives you a concrete week-by-week plan from CF 1100 to 2100.
Cross-Chapter Connections
- Data Structure Selection Guide references all major structures from Chapter 2: Data Structures
- DP vs Greedy Guide connects Greedy (Chapter 1) with DP Thinking Framework (Chapter 4)
- BFS vs DFS Guide complements BFS and DFS from Chapter 3
- Common Templates provides ready-to-use implementations of structures from Chapters 2–6
- Study Plan maps directly to the practice problems in Chapter 12: Practice Ladders
- Debugging Under Pressure pairs with Debugging and Stress Testing from Chapter 0
File Listing
| File | Topic | Level |
|---|---|---|
| bfs-vs-dfs-guide | BFS vs DFS Decision Guide | ⭐ |
| dp-vs-greedy-guide | DP vs Greedy Decision Guide | ⭐ |
| stl-quick-reference | STL Quick Reference | ⭐ |
| common-templates | Common C++ Templates | ⭐⭐ |
| complexity-cheatsheet | Complexity Cheatsheet | ⭐ |
| data-structure-selection-guide | Data Structure Selection Guide | ⭐⭐ |
| debugging-under-pressure | Debugging Under Pressure | ⭐⭐ |
| cf-tips-and-workflow | Codeforces Tips and Workflow | ⭐⭐ |
| study-plan | Study Plan — CF 1100 → 2100 | ⭐⭐ |
| reflections | Reflections | ⭐ |
Suggested Reading Order
Two paths through this chapter — they are not used in the same moment.
Before contests (study and preparation):
- complexity-cheatsheet — quick reference for all complexities
- stl-quick-reference — STL containers and algorithms at a glance
- bfs-vs-dfs-guide — when to use which traversal
- dp-vs-greedy-guide — when to use DP vs greedy
- data-structure-selection-guide — pick the right structure for the job
- common-templates — copy-paste-ready C++ contest templates
- cf-tips-and-workflow — contest strategy and testing workflow
- study-plan — personalized progression plan from 1100 to 2100
- reflections — honest observations on getting stuck and getting better
During contests (quick-reference path):
- complexity-cheatsheet — sanity-check your candidate approach
- stl-quick-reference — syntax recall under pressure
- ds-selection-poster, dp-pattern-poster, graph-algorithm-poster — one-page decision aids
- debugging-under-pressure — protocol when WA strikes