List of Algorithms and data structures for Competitive Programming

YOUTUBE CHANNEL


 List of most used data structures and algorithms along with their tutorials, implementation and some problems on them.




  1. Binary Search :
    Tutorial, Problems 6.3kTutorial, Implementation 1.6kProblem 1.8k

  2. Quicksort :
    Tutorial, Implementation 953Tutorial 450

  3. Merge Sort :
    Tutorial, Implementation 450Tutorial 450

  4. Suffix Array :
    Tutorial 839Tutorial, Implementation 369Tutorial, Implementation 151Problem 226Problem 105

  5. Knuth-Morris-Pratt Algorithm (KMP) :
    Tutorial 637Tutorial, Implementation 204Tutorial 62Problem 193

  6. Rabin-Karp Algorithm :
    Tutorial, Implementation 296Tutorial 55Problem 59Problem 39

  7. Tries :
    Tutorial, Problems 423Tutorial : I, 196 II 45Tutorial 71Problem 82Problem 40Problem 47

  8. Depth First Traversal of a graph :
    Tutorial, Impelementation 460Tutorial, Problems 268Problem 167Problem 72Problem 58

  9. Breadth First Traversal of a graph :
    Tutorial, Impelementation 165Tutorial, Problems 268Problem 58Problem 29Problem 22Flood Fill 29

  10. Dijkstra’s Algorithm :
    Tutorial, Problems 303Problem 86Tutorial(greedy) 62Tutorial (with heap) 39Implementation 55Problem 41Problem 36

  11. Binary Indexed Tree :
    Tutorial, Problems 265Tutorial 67Original Paper 35Tutorial 26Tutorial 18Problem 43Problem 16,
    Problem 19Problem 24Problem 14Problem 20Problem 21

  12. Segment Tree (with lazy propagation) :
    Tutorial, Implementation 228Tutorial 79Tutorial, Problems, Implementation 83Tutorial, Implementation and Various Uses 48, Persistent Segment Tree: 20II 13, problems same as BIT, Problem 43Problem 11/HLD is used as well/

  13. Z algorithm :
    Tutorial, Problem 231Tutorial 27Tutorial 22, problems same as KMP.

  14. Floyd Warshall Algorithm :
    Tutorial, Implementation 145Problem 30Problem 8

  15. Sparse Table (LCP, RMQ) :
    Tutorial, Problems 97Tutorial, Implementation(C++) 24Java implementation 8

  16. Heap / Priority Queue / Heapsort :
    Implementation, Explanation 133Tutorial 49Implementation 17Problem 47, Chapter from CLRS

  17. Modular Multiplicative Inverse 86

  18. Binomial coefficients (nCr % M): Tutorial 75Tutorial 13Paper 18 (Link Not Working), Problem 17

  19. Suffix Automaton :
    Detailed Paper 33Tutorial, Implementation (I) 33Tutorial, Implementation (II) 9Problem 6Problem 3Problem 59Problem 105Tutorial, Implementation 6

  20. Lowest Common Ancestor :
    Tutorial, Problems 110Paper 24Paper 12Problem 16Problem 6Problem 11

  21. Counting Inversions :
    Divide and Conquer 68Segment Tree 23Fenwick Tree 26Problem 15

  22. Euclid’s Extended Algorithm 67

  23. Suffix Tree :
    Tutorial 66Tutorial 9Intro 7, Construction : 5II 3Implementation 6Implementation 3Problem 3Problem 3Problem 1Problem 1

  24. Dynamic Programming :
    Chapter from CLRS(essential), Tutorial, Problems 402Problem 100Problem 22Problem 14Problem 13Tutorial 28Problem 11Problem 9Problem 15Longest Increasing Subsequence 16Bitmask DP 55Bitmask DP 24Optimization 17Problem 10Problem 6Problem 4Problem 4Problem 3Problem 5Problem 11, DP on Trees : 33II 13

  25. Basic Data Structures :
    Tutorial 277Stack Implementation 162Queue Implementation, Tutorial 52Linked List Implementation 141

  26. Logarithmic Exponentiation 73

  27. Graphs :
    Definition, Representation 136Definition, Representation 27Problem 60Problem 22

  28. Minimum Spanning Tree :
    Tutorial 35Tutorial, Kruskal’s Implementation 26Prim’s Implementation 11Problem 7Problem 4Problem 16Problem 5Problem 3

  29. Efficient Prime Factorization 62

  30. Combinatorics :
    Tutorial, Problems 229Problem 43Tutorial 64

  31. Union Find/Disjoint Set :
    Tutorial 87Tutorial, Problems 43Problem 20Problem 16Problem 8

  32. Knapsack problem :
    Solution, Implementation 136

  33. Aho-Corasick String Matching Algorithm :
    Tutorial 61Implementation 23Problem 10Problem 2Problem 3Problem 2

  34. Strongly Connected Components :
    Tutorial, Implementation 46Tutorial 3Problem 8Problem 2Problem 4

  35. Bellman Ford algorithm :
    Tutorial, Implementation 53Tutorial, Implementation 3Problem 10Problem 6

  36. Heavy-light Decomposition :
    Tutorial, Problems 47Tutorial, Implementation 12Tutorial 10Implementation 6Implementation 3Problem 2Problem 3Problem 3

  37. Convex Hull :
    Tutorial, Jarvis Algorithm Implementation 52Tutorial with Graham scan 5Tutorial 2Implementation 5Problem 7Problem 7Problem 2Problem 1Problem 3

  38. Line Intersection :
    Tutorial, Implementation 42Tutorial, Problems 7

  39. Sieve of Erastothenes 67

  40. Interval Tree :

  41. Tutorial, Implementation 56Problem 5Problem 1Problem 2Problem 1Problem 2Problem 3Tutorial 3

  42. Counting Sort 38

  43. Probabilities 84

  44. Matrix Exponentiation :
    Tutorial 58Tutorial 8

  45. Network flow :
    (Max Flow)Tutorial : I, 33 II 6Max Flow(Ford-Fulkerson) Tutorial, Implementation 19(Min Cut) Tutorial, Implementation 4(Min Cost Flow)Tutorial : I, 6 II, 2 III 1Dinic’s Algorithm with Implementation 5Max flow by Edmonds Karp with Implementation 7Problem 4ProblemProblemProblem 2Problem 2ProblemProblem 4Problem 1Problem 1ProblemProblemProblem 1ProblemProblem 2Problem 3

  46. K-d tree :
    Tutorial 63Tutorial 16Implementation 20Problem 12

  47. Deque 49

  48. Binary Search Tree :
    Tutorial, Implementation 105Searching and Insertion 22Deletion 7

  49. Quick Select :
    Implementation 25Implementation 4

  50. Treap/Cartesian Tree :
    Tutorial(detailed) 32Tutorial, Implementation 14Uses and Problems 16Problem 1Problem 1

  51. Game Theory :
    Detailed Paper 73Tutorial, Problems 24Grundy Numbers 12Tutorial with example problems - I, 10 II, 2 III, 1 IV 1Tutorial, Problems 5Problem 1Problem 3Problem 4Problem 2ProblemProblem 1Problem 2Problem 3Problem 3Problem 2Problem 3Nim 6

  52. STL (C++) :
    I, 325 II 130Crash Course 439

  53. Maximum Bipartite Matching 35

  54. Manacher’s Algorithm :
    Implementation 34Tutorial 18Tutorial, Implementation 3Tutorial, Implementation 3Problem 5Problem 3Problem 7

  55. Miller-Rabin Primality Test 25 and this 4

  56. Stable Marriage Problem 50

  57. Hungarian Algorithm 39Tutorial 6

  58. Sweep line Algorithm : I 29II 8

  59. LCP :
    Tutorial, Implementation 50Tutorial, Implementation 10

  60. Gaussian Elimination 35

  61. Pollard Rho Integer Factorization 11problem 5

  62. Topological Sorting 26

  63. Detecting Cycles in a Graph : Directed - 16II 7
    Undirected : 7

  64. Geometry : Basics 59Tutorial 29

  65. Backtracking :
    N queens problem 53Tug of War 12Sudoku 12

  66. Eulerian and Hamiltonian Paths :
    Tutorial 8Tutorial 2(Eulerian Path and Cycle)Implementation 3(Hamiltonian Cycle)Implementation 7

  67. Graph Coloring :
    Tutorial, Implementation 65

  68. Meet in the Middle :
    Tutorial 71Implementation 13

  69. Arbitrary Precision Integer(BigInt) 6II 1

  70. Radix Sort 15Bucket Sort 6

  71. Johnson’s Algorithm :
    Tutorial 49Tutorial 6Implementation 11

  72. Maximal Matching in a General Graph :
    Blossom/Edmond’s Algorithm, Implementation 22Tutte Matrix 2Problem 6

  73. Recursion : I, 63 II 15Towers of Hanoi 25 with explanation 13

  74. Inclusion and Exclusion Principle : I 29II 1

  75. Co-ordinate Compression 23

  76. Sqrt-Decomposition :
    Tutorial 53Tutorial 13Problem 20Problem 11

  77. Link-Cut Tree :
    Tutorial 53Wiki 12Tutorial, Implementation 17Problem 4Problem 2Problem 2Problem 6

  78. Euler’s Totient Function :
    Explanation, Implementation, Problems 63Explanation, Problems 14

  79. Burnside Lemma :
    Tutorial 51Tutorial 10Problem 17

  80. Edit/Levenshtein Distance :
    Tutorial 35Introduction 12Tutorial 11Problem 10Problem 10

  81. Branch and Bound 77

  82. Math for Competitive Programming 754

  83. Mo’s Algorithm : Tutorial and Problem

Men' fashion , Dating Tips , Relationship Advice

Post a Comment