Turn an algorithm that takes the mastery of ACM.
It should be noted that ACM is highly competitive and therefore should be associated with its own practical application.
Suitable for their own is good, some people are not suitable for algorithms, like system architecture, so do not see what others envy,
It's important to play with your strengths.
The first stage: the practice of classical algorithms, each of the following algorithms give me 10 to 20 times, while self-streamlining code,
Because too often, so to practice to write without thinking, 10-15 minutes to finish, or even turn off the monitor can be the program to play
Come out.
1. Shortest Way (Floyd, Dijstra,bellmanford)
2. Minimum spanning tree (first write a prim,kruscal to use and check set, not write)
3. Large number (high accuracy) subtraction
4. Two points to find. (code can be within five elements)
5. Cross-multiply, sentence line intersection, and then write a convex bag.
6.BFS, DFS, while proficient hash table (to be ripe, to be flexible, code to simplify)
7. Mathematically, there are: the Division of the Division (two lines), the intersection of segments, the multi-angular area formula.
8. Call the system qsort, a lot of tricks, slowly mastered.
9. Conversion between any binary
Phase two: Practice a bit more complex, but also more commonly used algorithms.
Such as:
1. Two graph matching (Hungary), Minimum path overlay
2. Network flow, minimum cost flow.
3. Segment tree.
4. And check the set.
5. Familiar with the various models of dynamic programming: LCS, maximum increment substring, triangulation, memory DP
6. Game-like algorithms. Game tree, binary method and so on.
7. Maximum group, maximum independent set.
8. Determine the point within the polygon.
9. Differential constraint system.
10. Bidirectional breadth Search, a * algorithm, minimum dissipation priority.
The relevant knowledge
Graph theory
Path problem
0/1 Edge Right Shortest path
BFS
Non-negative edge right Shortest path (Dijkstra)
can use Dijkstra to solve the problem characteristics
The shortest path of negative edge right
Bellman-ford
yen-optimization of Bellman-ford
Differential constraint system
Floyd
Generalized path problems
Transitive closures
Minimum maximum distance/maximum minimum distance
Euler Path/tour
Trap Loop algorithm
Euler Path/tour of mixed graphs
Hamilton Path/tour
Hamilton Path/tour construction of special graphs
Spanning Tree issues
Minimum spanning tree
Section K Small Spanning tree
Optimal ratio spanning tree
0/1 Fractional Planning
Degree limit spanning tree
Connectivity issues
Powerful DFS algorithm
undirected graph Connectivity
Cut the dots.
Cutting Edge
Two connected branches
undirected graph Connectivity
Strongly connected branches
2-sat
Minimum point base
A direction-free graph
Topological sorting
Relationship between a direction-free graph and dynamic programming
The problem of binary graph matching
The transformation thinking of general graph problem and dichotomy graph problem
Maximum Match
Minimum path overlay for a graph
0/1 minimum coverage of matrices
Complete match
Best match
Stable marriage
Network flow problems
The simple characteristics of network flow model and its relationship with linear programming
Maximum flow minimum cut theorem
Maximum flow problem
Maximum flow problem with upper and lower bounds
Cyclic flow
Minimum cost maximum flow/maximum cost maximum flow
The character and judgement of string graphs
Combinatorial mathematics
The common thought of solving combinatorial mathematics problems
Approximation
Recursive/Dynamic Planning
Probability problem
Polya theorem
Computational geometry/analytic geometry
Core of computational geometry: cross product/Area
The main force of analytic geometry: plural
Basic shape
Point
Line, line segment
Polygon
Convex hull
Introduction of convex hull algorithm, volume wrapping method
Graham Scanning method
Introduction of horizontal order, patch of collinear convex package
Perfect convex packet algorithm
Related judgments
Two straight lines intersect
Intersection of two segments
Determination of points within a freeform polygon
Determination of points within convex polygons
Classic Questions
Min Circumscribed Circle
The minimum circumscribed circle algorithm for approximate o (n)
Point Set diameter
Rotating jam, to heel point
Triangulation of polygons
Mathematics/Number Theory
Greatest common divisor
Euclid algorithm
Extended Euclid algorithm
Same congruence/two yuan one indefinite equation
Congruence equations
Linear Systems
Gaussian elimination element method
Solving a linear equation set on a mod 2 domain
Exact solution to the whole coefficient equation set
Matrix
Calculation of determinant
Fast computation of recursive relationships using matrix multiplication
Scores
Fractional Tree
Even fractional approximation
Number theory calculation
Ask for an approximate number of n
Seek Phi (N)
Ask for approximate and
Fast Number theory transformation
......
Prime problem
Probability-based Algorithm for judgement
Probability factor decomposition
Data
Organizational structure
Two-fork Pile
Left-leaning tree
Two Item tree
Victor Tree
Jumping table
Style icons
Oblique heap
Reap
Statistical structure
Tree-like array
Virtual Two-fork tree
Segment Tree
Rectangular area and
Circular area and
Relationship structure
Hash table
and check Set
Application of Path compression idea
Data structures in the STL
Vector
Deque
Set/map
Dynamic Planning/Memory Search
The difference between dynamic planning and memory search in the way of thinking
Oldest sequence series problems
Longest non-descending sub-sequence
Longest common sub-sequence
Longest common non-descending sub-sequence
A dynamic programming method for a class of NP problems
Tree-type dynamic programming
Knapsack problem
Optimization of dynamic programming
Quadrilateral inequalities
The concave and convex nature of functions
State design
Planning direction
Linear programming
Common ideas
Two-part minimal notation
String
KMP trie Structure
Suffix tree/suffix array lca/rmq
Theory of finite state automata
Sort
Select/Bubble Quick Sort heap sort Merge sort
Base sort topology Sort Sort network
Intermediate:
I. Basic algorithm:
(1) Application of the standard Template Library for C + +. (poj3096,poj3007)
(2) More complex training of simulated questions (poj3393,poj1472,poj3371,poj1027,poj2706)
Two. Graph algorithm:
(1) The establishment and solution of the differential constraint system. (poj1201,poj2983)
(2) Minimum cost maximum flow (poj2516,poj2516,poj2195)
(3) Dual connected components (poj2942)
(4) strongly connected branches and their shrinking points. (poj2186)
(5) Cutting edge and cutting point of the figure (poj3352)
(6) Minimum cut model, Network Flow Protocol (poj3308,)
Three. Data structure.
(1) Segment tree. (poj2528,poj2828,poj2777,poj2886,poj2750)
(2) static binary search tree. (poj2482,poj2352)
(3) Tree Tree Group (poj1195,poj3321)
(4) RMQ. (poj3264,poj3368)
(5) and check the advanced application of the set. (poj1703,2492)
(6) KMP algorithm. (poj1961,poj2406)
Four. Search
(1) Optimization pruning and feasibility pruning
(2) Search techniques and optimizations (poj3411,poj1724)
(3) Memory Search (poj3373,poj1691)
Five. Dynamic planning
(1) more complex dynamic programming (such as dynamic programming to solve the specific problem of the implementation of the business)
(poj1191,poj1054,poj3280,poj2029,poj2948,poj1925,poj3034)
(2) Dynamic planning of recording status. (poj3254,poj2411,poj1185)
(3) Tree-type dynamic programming (poj2057,poj1947,poj2486,poj3140)
Six. Mathematics
(1) Combinatorial mathematics:
1. The principle of repulsion.
2. Drawer principle.
3. Permutation group and Polya theorem (poj1286,poj2409,poj3270,poj1026).
4. Recursion relationship and parent function.
(2) Mathematics.
1. Gaussian elimination method (poj2947,poj1487, poj2065,poj1166,poj1222)
2. Probability problems. (poj3071,poj3440)
3.GCD, extended Euclidean (Chinese remainder theorem) (poj3101)
(3) Calculation method.
1.0/1 fractional planning. (poj2976)
2. The three-point method solves the extremum of single-peak (valley).
3. Matrix Method (poj3150,poj3422,poj3070)
4. Iterative approximation (poj3301)
(4) randomization algorithm (poj3318,poj2454)
(5) Miscellaneous questions.
(poj1870,poj3296,poj3286,poj1095)
Seven. Computational geometry.
(1) discretization of the coordinates.
(2) Scan line algorithm (for example, to find the area and perimeter of a rectangle and often used with a segment tree or heap).
(poj1765,poj1177,poj1151,poj3277,poj2280,poj3004)
(3) The core of the polygon (half-plane intersection) (poj3130,poj3335)
(4) Comprehensive application of geometric tools. (poj1819,poj1066,poj2043,poj3227,poj2165,poj3429)
Senior:
I. Basic algorithm requirements:
(1) Code quickly written, streamlined but without losing style
(poj2525,poj1684,poj1421,poj1048,poj2050,poj3306)
(2) Ensure correctness and efficiency. poj3434
Two. Graph algorithm:
(1) degree limit minimum spanning tree and K-shortest. (poj1639)
(2) Shortest path, minimum spanning tree, binary graph, maximum flow problem related theory (mainly model establishment and solution)
(poj3155, poj2112,poj1966,poj3281,poj1087,poj2289,poj3216,poj2446
(3) optimal ratio spanning tree. (poj2728)
(4) Minimum tree shape (poj3164)
(5) Sub-niche into a tree.
(6) The least ring of the graph and the direction graph
Three. Data structure.
(1) Establishment and application of Trie diagram. (poj2778)
(2) LCA and RMQ Problems (LCA (recent common ancestor issues) have offline algorithms (and check set +dfs) and online algorithms
(Rmq+dfs)). (poj1330)
(3) Double-ended queue and its application (maintain a monotonous queue, often in the dynamic planning to optimize the state transfer
Purpose). (poj2823)
(4) left-leaning tree (can be combined with heap).
(5) suffix tree (very useful data structure, is also the hotspot of the Division examination Questions).
(poj3415,poj3294)
Four. Search
(1) More troublesome Search topic training (poj1069,poj3322,poj1475,poj1924,poj2049,poj3426)
(2) The state optimization of wide search: the use of M-binary number storage state, converted to string hash table weight, the position of compressed storage state, two-way wide search, a * algorithm. (poj1768,poj1184,poj1872,poj1324,poj2046,poj1482)
(3) Deep search optimization: As far as possible to use bit operations, must be added pruning, function parameters as little as possible, the number of layers is not too large, you can consider two-way search or rotation search, ida* algorithm. (poj3131,poj2870,poj2286)
Five. Dynamic planning
(1) Dynamic programming with data structure optimization is required.
(poj2754,poj3378,poj3017)
(2) Quadrilateral inequality theory.
(3) More difficult state DP (POJ3133)
Six. Mathematics
(1) Combinatorial mathematics.
1.MoBius Inversion (poj2888,poj2154)
2. Partial-order relationship theory.
(2) Game theory.
1. Maximum minimum process (poj3317,poj1085)
2.Nim problem.
Seven. Computational geometry.
(1) Semi-planar intersection (poj3384,poj2540)
(2) Establishment of visual image (poj2966)
(3) The minimum circle cover of the point set.
(4) to heel point (poj2079)
Eight. General questions.
(poj3109,poj1478,poj1462,poj2729,poj2048,poj3336,poj3315,poj2148,poj1263)
Early:
I. Basic algorithm:
(1) enumeration. (poj1753,poj2965) (2) Greed (poj1328,poj2109,poj2586)
(3) The method of recursion and division. (4) recursion.
(5) Construction method. (poj3295) (6) Simulation method. (poj1068,poj2632,poj1573,poj2993,poj2996)
Two. Graph algorithm:
(1) Depth-first traversal and breadth-first traversal of graphs.
(2) Shortest path algorithm (Dijkstra,bellman-ford,floyd,heap+dijkstra)
(poj1860,poj3259,poj1062,poj2253,poj1125,poj2240)
(3) Minimum spanning tree algorithm (Prim,kruskal)
(poj1789,poj2485,poj1258,poj3026)
(4) Topology sequencing (poj1094)
(5) Maximum matching of binary graphs (Hungarian algorithm) (poj3041,poj3020)
(6) The maximum flow augmented path algorithm (km algorithm). (poj1459,poj3436)
Three. Data structure.
(1) string (poj1035,poj3080,poj1936)
(2) Sorting (fast, merge rows (related to reverse order number), heap rows) (poj2388,poj2299)
(3) Simple and check-set application.
(4) Hash table and binary search Efficient search method (number of hash, string of hash)
(poj3349,poj3274,poj2151,poj1840,poj2002,poj2503)
(5) Huffman tree (poj3253)
(6) Heap
(7) Trie tree (static achievements, dynamic Achievements) (poj2513)
Four. Simple search
(1) Depth-first search (poj2488,poj3083,poj3009,poj1321,poj2251)
(2) Breadth First search (poj3278,poj1426,poj3126,poj3087.poj3414)
(3) Simple search techniques and pruning (poj2531,poj1416,poj2676,1129)
Five. Dynamic planning
(1) knapsack problem. (poj1837,poj1276)
(2) Type of simple DP (refer to LRJ's book page149) as follows:
1.e[j]=opt{d+w (I,J)} (poj3267,poj1836,poj1260,poj2533)
2.e[i,j]=opt{d[i-1,j]+xi,d[i,j-1]+yj,d[i-1][j-1]+zij} (longest common sub-sequence)
(poj3176,poj1080,poj1159)
3.C[I,J]=W[I,J]+OPT{C[I,K-1]+C[K,J]}. (Optimal binary search tree problem)
Six. Mathematics
(1) Combinatorial mathematics:
1. Addition principle and multiplication principle.
2. Arrange the combination.
3. Recursion relationship.
(poj3252,poj1850,poj1019,poj1942)
(2) Number theory.
1. Prime number and division of integers
2. Binary bits.
3. Same comodule operation.
(poj2635, poj3292,poj1845,poj2115)
(3) Calculation method.
1. Two-point method to solve the monotone function related knowledge. (poj3273,poj3258,poj1905,poj3122)
Seven. Computational geometry.
(1) Geometric formula.
(2) The use of cross-product and dot product (such as the determination of intersection of segments, the distance from points to segments, etc.). (poj2031,poj1039)
(3) A multilateral type of simple algorithm (area) and related judgments (points in the multilateral type, whether the multilateral type intersect)
(poj1408,poj1584)
(4) Convex bag. (poj2187,poj1113)
Well, ACM follows this step by step.