Вы находитесь на странице: 1из 5

Hello all,

I've been practicing at Codechef for a while and now I'm gradually moving toward
medium/hard problems. However many algorithms at these levels are very difficul
t to predict, and I was always stuck because I'm not aware of them. So I open th
is topic, my hope is to have a wish-list of most used algorithm for online progr
amming contest that I can look up for reference. Here is my short-list up to now
:
Segment tree (with lazy propagation)
Interval Tree
Binary Indexed Tree
Fast Modulo Multiplication (Exponential Squaring)
Heuristic Algorithms
KMP string searching
Manacher's Algorithm
Union Find/Disjoint Set
Trie
Prime Miller Rabin
Matrix Recurrence + Fast Modulo Multiplication for counting
Stable Marriage Problem
Extended Euclid's algorithm
Ternary Search
Fast Fourier Transform for fast polynomial multiplication
Djikstra's algorithm, Bellman-ford algorithm, Floyd-Warshall Algorithm
Prim's Algorithm, Kruskal's Algorithm
RMQ, LCA
Flow related algorithms, assignment problem, Hungarian algorithm
Bipartite matching algorithms
Heavy-light decomposition
Sweep line algorithm
Z algorithm
Convex Hull
Suffix Arrays
LCP
Suffix Tree
Gaussian Elimination
Numerical Integration/Differentiation
Line Clipping
Advanced Maths Ad-Hoc problems
Aho Corasick string matching algorithm;
Calculate nCr % M Lucas's Theorem
Heavy Light decomposition in trees
Inverse Modulo operations
Pollard Rho Integer Factorization
Catalan Numbers

Hi all, I need your help to make a list of most used data structures and algorit
hms along with their tutorials, implementation and some problems on them. It wil
l be helpful to everyone in many ways. I request everyone to contribute to this
list by providing links to tutorials, problems, etc. I will keep updating this l
ist regularly.
Binary Search : Tutorial, Problems, Tutorial, Implementation, Problem
Quicksort : Tutorial, Implementation, Tutorial
Merge Sort : Tutorial, Implementation, Tutorial

Suffix Array : Tutorial, Tutorial, Implementation, Tutorial, Implementation,


Problem, Problem, Problem
Knuth-Morris-Pratt Algorithm (KMP) : Tutorial, Tutorial, Implementation, Pro
blem
Rabin-Karp Algorithm : Tutorial, Implementation, Tutorial, Problem, Problem
Tries : Tutorial, Problems, Tutorial : I, II, Tutorial, Problem, Problem, Pr
oblem
Depth First Traversal of a graph : Tutorial, Impelementation, Tutorial, Prob
lems, Problem, Problem, Problem
Breadth First Traversal of a graph : Tutorial, Impelementation, Tutorial, Pr
oblems, Problem, Problem, Problem, Flood Fill
Dijkstra's Algorithm : Tutorial, Problems, Problem, Tutorial(greedy), Tutori
al (with heap), Implementation, Problem, Problem
Binary Indexed Tree : Tutorial, Problems, Tutorial, Original Paper, Tutorial
, Tutorial, Problem, Problem, Problem, Problem, Problem, Problem
Segment Tree (with lazy propagation) : Tutorial, Implementation, Tutorial, T
utorial, Problems, Implementation, Tutorial, Implementation and Various Uses, Pe
rsistent Segment Tree, problems same as BIT, Problem, Problem/HLD is used as wel
l/
Z algorithm : Tutorial, Problem, Tutorial, problems same as KMP.
Floyd Warshall Algorithm : Tutorial, Implementation, Problem, Problem
Sparse Table(RMQ) : Tutorial, Problems, Tutorial, Implementation(C++), Java
implementation
Heap / Priority Queue / Heapsort : Implementation, Explanation, Tutorial, Im
plementation, Problem, Chapter from CLRS
Modular Multiplicative Inverse
nCr % M
Suffix Automaton : Detailed Paper, Tutorial, Implementation (I), Tutorial, I
mplementation (II), Problem, Problem, Problem, Problem, Tutorial, Implementation
Lowest Common Ancestor : Tutorial, Problems, Paper, Paper, Problem, Problem,
Problem
Counting Inversions : Divide and Conquer, Segment Tree, Fenwick Tree, Proble
m
Euclid's Extended Algorithm
Suffix Tree : Tutorial, Tutorial, Tutorial, Tutorial, Implementation, Implem
entation, Problem, Problem, Problem, Problem
Dynamic Programming : Chapter from CLRS(essential), Tutorial, Problems, Prob
lem, Problem, Problem, Problem, Tutorial, Problem, Problem, Problem, Longest Inc
reasing Subsequence, Bitmask DP, Bitmask DP, Optimization, Problem, Problem, Pro
blem, Problem, Problem, Problem, Problem, DP on Trees : I, II

Basic Data Structures : Tutorial, Stack Implementation, Queue Implementation


, Tutorial, Linked List Implementation
Logarithmic Exponentiation
Graphs : Definition, Representation, Definition, Representation, Problem, Pr
oblem
Minimum Spanning Tree : Tutorial, Tutorial, Kruskal's Implementation, Prim's
Implementation, Problem, Problem, Problem, Problem, Problem
Efficient Prime Factorization
Combinatorics : Tutorial, Problems, Problem, Tutorial
Union Find/Disjoint Set : Tutorial, Tutorial, Problems, Problem, Problem, Pr
oblem
Knapsack problem : Solution, Implementation
Aho-Corasick String Matching Algorithm : Tutorial, Implementation, Problem,
Problem, Problem, Problem
Strongly Connected Components : Tutorial, Implementation, Tutorial, Problem,
Problem, Problem
Bellman Ford algorithm : Tutorial, Implementation, Tutorial, Implementation,
Problem, Problem
Heavy-light Decomposition : Tutorial, Problems, Tutorial, Implementation, Tu
torial, Implementation, Implementation, Problem, Problem, Problem
Convex Hull : Tutorial, Jarvis Algorithm Implementation, Tutorial with Graha
m scan, Tutorial, Implementation, Problem, Problem, Problem, Problem
Line Intersection : Tutorial, Implementation, Tutorial, Problems
Sieve of Erastothenes
Interval Tree : Tutorial, Implementation, Problem, Problem, Problem, Problem
, Problem, Problem, Tutorial
Counting Sort
Probabilities
Building up the recurrence matrix to compute recurrences in O(logN) time
Network flow : (Max Flow)Tutorial : I, II, Max Flow(Ford-Fulkerson) Tutorial
, Implementation, (Min Cut) Tutorial, Implementation, (Min Cost Flow)Tutorial :
I, II, III, Dinic's Algorithm with Implementation, Max flow by Edmonds Karp with
Implementation, Problem, Problem, Problem, Problem, Problem, Problem, Problem,
Problem, Problem, Problem, Problem, Problem, Problem, Problem, Problem
K-d tree : Tutorial, Tutorial, Implementation, Problem
Deque
Binary Search Tree : Tutorial, Implementation, Searching and Insertion, Dele

tion
Quick Select : Implementation, Implementation
Treap/Cartesian Tree : Tutorial(detailed), Tutorial, Implementation, Uses an
d Problems, Problem, Problem
Game Theory : Detailed Paper, Tutorial, Problems, Grundy Numbers, Tutorial w
ith example problems - I, II, III, IV, Tutorial, Problems, Problem, Problem, Pro
blem, Problem, Problem, Problem, Problem, Problem, Problem, Problem, Problem, Ni
m
STL (C++) : I, II, Crash Course
Maximum Bipartite Matching
Manacher's Algorithm : Implementation, Tutorial, Tutorial, Implementation, T
utorial, Implementation, Problem, Problem, Problem
Miller-Rabin Primality Test : Code
Stable Marriage Problem
Hungarian Algorithm, Tutorial
Sweep line Algorithm : I, II
LCP : Tutorial, Implementation, Tutorial, Implementation
Gaussian Elimination
Pollard Rho Integer Factorization, problem
Topological Sorting
Detecting Cycles in a Graph : Directed - I, II Undirected : I
Geometry : Basics, Tutorial
Backtracking : N queens problem, Tug of War, Sudoku
Eulerian and Hamiltonian Paths : Tutorial, Tutorial, (Eulerian Path and Cycl
e)Implementation, (Hamiltonian Cycle)Implementation
Graph Coloring : Tutorial, Implementation
Meet in the Middle : Tutorial, Implementation
Arbitrary Precision Integer(BigInt), II
Radix Sort, Bucket Sort
Johnson's Algorithm : Tutorial, Tutorial, Implementation
Maximal Matching in a General Graph : Blossom/Edmond's Algorithm, Implementa
tion, Tutte Matrix, Problem
Recursion : I, II, Towers of Hanoi with explanation
Inclusion and Exclusion Principle : I, II

Co-ordinate Compression
Sqrt-Decomposition : Tutorial, Tutorial, Problem, Problem
Link-Cut Tree : Tutorial, Wiki, Tutorial, Implementation, Problem, Problem,
Problem, Problem
Euler's Totient Function : Explanation, Implementation, Problems, Explanatio
n, Problems
Burnside Lemma : Tutorial, Tutorial, Problem
Edit/Levenshtein Distance : Tutorial, Introduction, Tutorial, Problem, Probl
em
Branch and Bound
http://discuss.codechef.com/questions/48877/data-structures-and-algorithms?sort=
votes&page=3

Вам также может понравиться