Getting Started
Competitive programming changed my life. It led to the ICPC World Finals and shaped how I approach software engineering. Here's what I wish I knew when starting.
Essential Data Structures
Master these before anything else:
Arrays and Strings
Manipulation techniquesTwo-pointer methodSliding windowStacks and Queues
Monotonic stack problemsBFS with queuesExpression evaluationTrees and Graphs
DFS and BFS traversalBinary treesGraph representations (adjacency list vs matrix)Hash Maps and Sets
O(1) lookupCounting problemsTwo-sum patternsCore Algorithms
Sorting
Understand when to use which:
Quick sort for general purposeMerge sort when stability mattersCounting sort for bounded integersSearching
Binary search (and its variations)Binary search on answerTernary searchDynamic Programming
The most important topic:
Identify overlapping subproblemsDefine state clearlyWrite recurrence relationImplement (top-down or bottom-up)Graph Algorithms
Shortest path (Dijkstra, Bellman-Ford)Minimum spanning tree (Kruskal, Prim)Topological sortStrongly connected componentsProblem-Solving Strategy
During Practice
**Read carefully** - Misreading costs time**Identify problem type** - Pattern recognition speeds solving**Start with brute force** - Then optimize**Test with examples** - Before submitting**Learn from solutions** - Even when you solve itDuring Contests
**Read all problems first** - Identify easy ones**Solve easy problems quickly** - Build confidence**Manage time** - Don't get stuck on one problem**Debug systematically** - Print statements are your friendRecommended Resources
Online Judges
**Codeforces** - Best for regular practice**LeetCode** - Great for interview prep**AtCoder** - Clean problems, good for beginners**USACO** - Structured learning pathBooks
"Competitive Programming 3" by Steven Halim"Introduction to Algorithms" (CLRS)"Guide to Competitive Programming" by Antti LaaksonenYouTube Channels
ErrichtoWilliam LinSecondThreadPractice Schedule
For serious improvement:
Daily (2-3 hours)
2-3 problems at your level1 problem slightly above your levelWeekly
1 virtual contestReview all unsolved problemsLearn one new topic deeplyMonthly
Participate in rated contestsTrack progressAdjust focus areasCommon Mistakes
**Solving too-easy problems** - Challenge yourself**Not reading editorials** - Learning from others is efficient**Skipping fundamentals** - Basics matter more than tricks**Comparing to others** - Focus on your progress**Burnout** - Take breaks, it's a marathonMy Journey
**Year 1**: Struggled with basic problems, rated 1200**Year 2**: Consistent practice, reached 1600**Year 3**: ETCPC Gold, rated 1900**Year 4**: ICPC World FinalsIt takes time. Trust the process.
Final Advice
**Be consistent** - Daily practice beats weekend marathons**Embrace difficulty** - Hard problems make you better**Join a community** - Learn with others**Enjoy it** - If it's not fun, you won't persistCompetitive programming is a journey. Start today.