It is a mental sport that enables you to code a given problem under provided constraints. I am also at the stage of learning try to explain it. Lets start first of all

What is Competitive Programming?
It is a mind sport, where people compete against each other to solve some programming questions/logic with an efficient approach and within a time constraint. The goal of competitive programming is to write code to solve a problem within a given timeframe.

Why Should You Do Competitive Programming?
CP is the best way to master your analytical thinking, and logical thinking and improve your coding skills. It is now being considered by many tech giants like Google and Facebook.

Here are some topics i studied for Competitive Programming:

1. Basics of Array, String, Greedy, and Bit Manipulation:

  • Counting frequencies of array elements
  • Float and Precision
  • Prefix sum, 2D Prefix Sum, Difference Array
  • Coordinate Compression
  • Kadane Algorithm
  • Activity Selection Problem
  • Job Sequencing Problem
  • Sliding Window
  • Logical Operators
  • Bit Manipulation

2. Number Theory and Combinatorics:

  • Prime Number and Sieve Algorithms
  • Number Factorization and GCD/LCM
  • Linear Diophantine Equations
  • Euclidean algorithms
  • Euler’s Totient Function and Euler’s Totient function
  • Inclusion-Exclusion Principle and Pigeon Hole Principle
  • Modular Operations and Modular Inverse
  • Chinese Remainder Theorem
  • Permutation and Combination
  • Catalan numbers

3. Searching, Sorting, and Basic Data Structures:

  • Linear Search and Binary Search
  • Sorting Algorithms
  • Stack, Queue, Deque, Priority Queue
  • Tree and Graph Traversal
  • Shortest Path Algorithms
  • Minimum Spanning Tree Algorithms
  • Topological Sorting
  • Bipartite Graphs
  • Strongly Connected Components
  • Flow Algorithms

4. Recursion and Dynamic Programming:

  • Recursion and Backtracking
  • Dynamic Programming Introduction and Practice Problems
  • Additional DP Problems and DP on Trees
  • DP on Bit Masking and Digit DP

5. String Algorithms:

  • Suffix Tree and Z Algorithm
  • Pattern Searching Algorithms
  • String Matching Algorithms

6. Geometry and Game Theory:

  • Closest Pair of Points and Convex Hull
  • Intersecting Line Segments and Point Polygon Testing
  • Combinatorial Game Theory and Minimax Algorithm
  • Nim Game Strategy and Game Theory

7. Advanced Data Structures:

  • Trie and Fenwick Tree
  • Segment Tree and Sparse Table
  • Sqrt Decomposition and Heavy Light Decomposition
  • Meet in the Middle and MO’s Algorithm
Hope this guide proves helpful in your learning journey! Feel free to share any suggestions or additional tips you may have, as we're all constantly learning and growing in this field. Please upvote it help 😉
Comments (2)