What Are the Must-Know Algorithms for Competitive Programming?

Revision en1, by iamsourabhroy2004_jh, 2024-12-10 09:06:52

Hey everyone!

I’m working on strengthening my competitive programming skills and want to ensure I’m covering all the essential algorithms and concepts. Here's what I have in mind so far:

Math & Number Theory

GCD/LCM, Modular Arithmetic, Prime Algorithms (Sieve), etc. Recursion & Backtracking

Classic problems like N-Queens, Subset Generation, and optimizations. Dynamic Programming (DP)

Knapsack, Subsequence Problems, Matrix DP, etc. Sorting & Searching

Binary Search, Two-pointer/Sliding Window, Merge/Quick Sort. Graph Algorithms

BFS, DFS, Shortest Path, MST, and Topological Sorting. Greedy Algorithms

Activity Selection, Interval Scheduling, Huffman Encoding. String Algorithms

KMP, Z Algorithm, Tries, and Suffix Arrays. Bit Manipulation

Subsets, Masking, and XOR Tricks. My Question: Am I missing any crucial algorithms or topics that I should focus on for competitive programming? What algorithms have helped you solve tricky problems?

I’d love to hear your recommendations or insights! Let’s build a comprehensive list together.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English iamsourabhroy2004_jh 2024-12-10 09:06:52 1144 Initial revision (published)