Top 10 Algorithms and Data Structures for Competitive Programming Last Updated : 23 Jul, 2025 Suggest changes Share 183 Likes Like Report In this post, we will discuss Important top 10 algorithms and data structures for competitive coding.Topics : Graph algorithmsDynamic programmingSearching and Sorting:Number theory and Other MathematicalGeometrical and Network Flow AlgorithmsData StructuresThe links below cover most important algorithms and data structure topics:Best Algorithms and Data Structures for Competitive ProgrammingGraph AlgorithmsBreadth First Search (BFS)Depth First Search (DFS)Shortest Path from source to all vertices **Dijkstra**Shortest Path from every vertex to every other vertex **Floyd Warshall**Minimum Spanning tree **Prim**Minimum Spanning tree **Kruskal**Topological SortJohnson's algorithmArticulation Points (or Cut Vertices) in a GraphBridges in a graphAll Graph Algorithms Dynamic ProgrammingLongest Common SubsequenceLongest Increasing SubsequenceEdit DistanceMinimum PartitionWays to Cover a DistanceLongest Path In MatrixSubset Sum ProblemOptimal Strategy for a Game0-1 Knapsack ProblemAssembly Line SchedulingAll DP Algorithms Searching And SortingBinary SearchQuick SortMerge SortOrder StatisticsKMP algorithmRabin karpZ's algorithmAho Corasick String MatchingCounting SortManacher's algorithm: Part 1, Part 2 and Part 3All Articles on Searching, Sorting and Pattern Searching. Number theory and Other MathematicalPrime Numbers and Prime Factorization Primality Test | Set 1 (Introduction and School Method)Primality Test | Set 2 (Fermat Method)Primality Test | Set 3 (Miller–Rabin)Sieve of EratosthenesSegmented SieveWilson’s TheoremPrime FactorizationPollard's rho algorithmModulo Arithmetic Algorithms Basic and Extended Euclidean algorithmsEuler’s Totient FunctionModular ExponentiationModular Multiplicative InverseChinese remainder theorem IntroductionChinese remainder theorem and Modulo Inverse ImplementationnCr%m and this.Miscellaneous:Counting InversionsCounting Inversions using BITlogarithmic exponentiationSquare root of an integerHeavy light Decomposition , this and thisMatrix RankGaussian Elimination to Solve Linear EquationsHungarian algorithmLink cutMo's algorithm and thisFactorial of a large number in C++Factorial of a large number in Java+Russian Peasant MultiplicationCatalan NumberAll Articles on Mathematical Algorithms Geometrical and Network Flow AlgorithmsConvex HullGraham ScanLine IntersectionInterval TreeMatrix Exponentiation and thisMaxflow Ford Furkerson Algo and Edmond Karp ImplementationMin cutStable Marriage ProblemHopcroft–Karp Algorithm for Maximum MatchingDinic's algo and e-maxxAll Articles on Geometric Algorithms Data StructuresBinary Indexed Tree or Fenwick treeSegment Tree (RMQ, Range Sum and Lazy Propagation)K-D tree (See insert, minimum and delete)Union Find Disjoint Set (Cycle Detection and By Rank and Path Compression)TriesSuffix array (this, this and this)Sparse tableSuffix automataSuffix automata IILCA and RMQAll Articles on Advanced Data Structures. How to Begin? Please see How to begin with Competitive Programming? How to Practice? Please see https://www.geeksforgeeks.org/ What are top algorithms in Interview Questions? Top 10 algorithms in Interview Questions How to prepare for ACM – ICPC? How to prepare for ACM – ICPC? This is an initial draft. We will soon be adding more links and algorithms to this post. The biggest mistake programmers make is probably getting discouraged and not practicing enough. Or practicing only on problems they feel they're good at. - Derek Kisman, aka SnapDragon Related Courses Competitive Programming - Live CourseTaking the first step is always hard, isn’t it? But we say no, why? Because we’ve brought a course that will help you to top the charts of leading coding competitions and interviews. Great right? You can start your journey of being a Competitive Programmer now, but before you start know the basics of Data structures and algorithms and programming foundations. Enroll Today, we'll see you inside the course. K kartik Follow 183 Article Tags : GBlog BFS Segment-Tree Binary Indexed Tree sieve Modular Arithmetic DFS Topological Sorting BIT number-theory GBlog-Competitive-Programming +7 More Explore GBlog - Explore Techâs Hottest Topics & Career Growth Hacks! 2 min read How To BecomeHow to become a Java Developer? 6 min read How to Become a GenAI Developer 8 min read How to become a Cloud Network Engineer? 11 min read How to Become a DevSecOps Engineer 9 min read How to become an Automation Tester? 11 min read RoadmapFull Stack Developer Roadmap [2025 Updated] 15 min read Complete DevOps Roadmap - Beginner to Advanced 8 min read Machine Learning Roadmap 11 min read Data Analyst Roadmap 1 min read Interview PreparationInterview Preparation Roadmap 5 min read Top Interview Problems Asked in 2024 (Topic Wise) 2 min read Top HR Interview Questions and Answers (2025) 15+ min read Database Administrator Interview Questions 14 min read Aptitude Questions and Answers 3 min read Project Ideas10 Best Computer Science Projects Ideas for Final Year Students 8 min read Top 10 Mini Project Ideas For Computer Science Students 7 min read 30+ Web Development Projects with Source Code [2025] 4 min read Top 10 Data Science Project Ideas for Beginners 13 min read Java Project Ideas For Beginners and Advanced 15+ min read 10 Best Linux Project Ideas For Beginners 7 min read Top 7 Python Project Ideas for Beginners in 2025 6 min read CertificationTop Machine Learning Certifications in 2025 9 min read DevOps Certification - A Way to Enhance Growth Opportunities 4 min read Top 10 Highest Paying Certifications 11 min read Tech Certifications: Worth the Effort in 2025? 9 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like