Proficient in data structure and common algorithm Aggregation

Source: Internet
Author: User

 

(1)

It is impossible to fully remember so many algorithms.
Common algorithms can be written after they are obtained.
Not commonly used. Pick up the book and read it for 10 minutes to understand the algorithm (because it was previously recorded ).
It is hard to explain algorithms that have not been recorded before. It may take several days to study these algorithms.
In this way, you can.

You should be familiar with the following common algorithms:
Various sorting algorithms (insert sorting, Bubble sorting, select sorting, fast sorting, heap sorting, and Merge Sorting)
Insert and delete linear tables (general linear tables, stacks, queues)
Binary tree traversal (forward, central, and backward)
Graph traversal (depth first, breadth first)
Binary lookup, binary sorting tree, and Hash Lookup (methods for dealing with conflicts ).

(2)

You can look at one thing from a different perspective. In many cases, it is the same as your own life. When you were a child, you felt that the problem was very naive. Now, you are fully aware of the problem, and the method is different. Why? Just grow up. Just like this, you may directly write simple algorithms, such as writing a program, but there are some interesting ways to do this, for example, how to express it and how to make it more efficient .. wait.

 

(3)

 

In universities, it is okay to learn basic professional courses, such as data structures, discretization, and operating systems. I have encountered some basic data structures and algorithms, such as searching and sorting, so I can immediately write the corresponding code based on the principle. I personally understand this. For more in-depth things, it is also based on your own proficiency.

 

(4)

Analysis of algorithm and data structure test questions 2nd Mechanical Industry Press
If you want to practice, there are more than N questions here to practice, but in practice, you can use less, unless you do some high-end things, however, you can also use it in your own projects.

 

(5)

 

The data structure may not be used at ordinary times, but the data structure can cultivate your program's awareness of efficiency, A program written by a person who has learned a data structure and a person who has not learned a data structure may differ in efficiency.

 

(6)

The algorithms that ACM needs to master.
Note that ACM is highly competitive, so you should associate it with your actual application.
What suits you is good. Some people are not suitable for algorithm or system architecture, so they don't get jealous of others,
It is important to give full play to your strengths.

Stage 1: practice common classical algorithms. Each of the following algorithms is used for 10 to 20 times, while streamlining the code by myself,
Because it is too common, you don't have to think about it when writing. You can even turn off the monitor within 10-15 minutes.
Come out.
1. Transient (Floyd, dijstra, bellmanford)
2. minimal spanning tree (write a prim first, and kruscal should use and query the set, which is hard to write)
3. Large numbers (High Precision) addition, subtraction, multiplication, and Division
4. Binary Search. (the code can be less than five lines)
5. Perform cross multiplication, determine the intersection of line segments, and then write a convex hull.
6. BFs, DFS, and skilled hash tables (be familiar, flexible, and concise)
7. mathematical formulas include: Moving and Division (within two rows), line segment intersection, and multi-angle area.
8. There are many tips for calling the system qsort.
9. Conversion between any binary systems

Stage 2: Exercise is a bit more complex, but it is also commonly used.
For example:
1. Bipartite Graph Matching (Hungary), minimum path Overwrite
2. network flow, minimum charge flow.
3. Line Segment tree.
4. Check the set.
5. Familiar with various typical dynamic planning models: LCs, longest incrementing substrings, triangle partitioning, and memory DP
6. classification algorithms. Game tree and binary method.
7. The largest group and the largest independent set.
8. points are located within the polygon.
9. Differential constraint system.
10. Bidirectional breadth search, A * algorithm, minimum dissipation first.

Related Knowledge

Graph Theory

Path Problems
0/1 Edge Weight Shortest Path
BFS
Non-negative edge weight Shortest Path (Dijkstra)
Features that can be solved by Dijkstra
Negative Edge Weight Shortest Path
Bellman-Ford
Bellman-Ford's Yen-s Optimization
Differential constraint system
Floyd
Generalized path
Passing Closure
Extremely small and extremely large distance/extremely small distance
Euler path/tour
Ring Algorithm
Euler path/tour of a hybrid Graph
Hamilton path/tour
Hamilton path/tour construction of a special Graph

Tree Generation
Minimum Spanning Tree
The k-th generation tree
Optimal Ratio Spanning Tree
0/1 score Planning
Degree limit Spanning Tree

Connectivity problems
Powerful DFS Algorithm
Undirected graph connectivity
Cut Point
Edge Cutting
2-connected branch
Directed Graph connectivity
Strongly Connected Branch
2-Sat
Minimum vertex Base

Directed Acyclic Graph
Topological sorting
Relationship between Directed Acyclic graphs and Dynamic Planning

Bipartite Graph Matching
Conversion between general graph problems and bipartite graph Problems
Max matching
Minimum path overwrite of a Directed Graph
0/1 minimum coverage of the matrix
Complete match
Optimal Match
Stable marriage

Network Flow Problems
Simple Features of the network stream Model and Its Relationship with Linear Planning
Max flow least cut Theorem
Maximum Flow Problems
Maximum stream problems with Upper and Lower Bounds
Loop stream
Minimum fee maximum flow/maximum fee Maximum Flow

The nature and determination of a string chart

Combined mathematics

Frequently Used ideas for solving combined mathematical problems
Approximation
Recursive/Dynamic Planning
Probability Problem
PolyA Theorem

Computational ry/analytic ry

Core of computational ry: Cross Product/Area
Main Force of analytic ry: plural

Basic
Point
Line, Line Segment
Polygon

Convex Polygon/convex bag
Introduction of convex packet algorithm and volume wrapping method

Graham Scanning Method
The introduction of horizontal order and the patch of Collinearity convex hull

Perfect convex hull algorithm

Correlation Determination
Intersection of two straight lines
Intersection of Two Line Segments
Point determination within any Polygon
Determination of points in a convex polygon

Classic Problems
Minimum external circle
Minimum outer circle algorithm for approximation of O (N)
Point Set diameter
Rotate the card shell
Triangle division of polygon

Mathematics/Number Theory

Maximum common approx.
Euclid Algorithm
Extended Euclid Algorithm
Homogeneous Equation/binary one-time Indefinite Equation
Homogeneous equations

Linear Equations
Gaussian elimination method
Solving Linear Equations in mod 2
Exact Solution to equations of Integer Coefficient

Matrix
Calculation of the determinant
Rapid Calculation of recursive relationships using matrix multiplication

Score
Score tree
Continuous score Approximation

Number theory computing
Evaluate the number of N approx.
Phi (N)
Sum
Fast number theory Transformation
......

Prime Number Problem
Probability discriminant Algorithm
Probability factor decomposition

Data Structure

Organizational Structure
Binary heap
Left Tree
Item tree
Winner tree
Skip table
Style icon
Oblique heap
Reap

Statistics Structure
Tree Array
Virtual Binary Tree
Line Segment tree
Rectangular area and
Circular area and

Link Structure
Hash table
Query set
Application of path compression

Data Structure in STL
Vector
Deque
Set/Map

Dynamic Planning/memory-based search

Differences between dynamic planning and memory-based search in Thinking Modes

Questions about the oldest generation
Maximum Non-descent subsequence
Longest Common subsequence
Longest Common subsequence without descent

Dynamic Programming for A Class of NP problems

Tree-based Dynamic Planning

Backpack Problems

Dynamic Planning Optimization
Quadrilateral Inequality
Convex and concave functions
Status Design
Planning direction

Linear Programming

Common ideas

Binary least representation

String

KMP trie Structure
Suffix tree/suffix array LCA/rmq
Finite State Automation Theory

Sort
Select/bubble fast sort Heap Sort merge sort
Base sorting topological sorting Network

Intermediate:
I. Basic Algorithms:
(1) Application of C ++ standard template library (poj3096, poj3007)
(2) Training of complex simulation questions (poj3393, poj1472, poj3371, poj1027, poj2706)
Ii. Graph Algorithm:
(1) Establishment and Solution of a differential constraint system (poj1201, poj2983)
(2) Maximum Minimum fee stream (poj2516, poj2516, poj2195)
(3) connected component (poj2942)
(4) strongly connected branches and their shrinkage points (poj2186)
(5) cut edge and cut point of an image (poj3352)
(6) Minimum Cut model and network flow protocol (poj3308 ,)
Iii. data structure.
(1) Line 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) advanced applications of the query set. (poj1703, 2492)
(6) KMP algorithm. (poj1961, poj2406)
4. Search
(1) optimal pruning and feasible pruning
(2) Search Skills and optimization (poj3411, poj1724)
(3) memory-based search (poj3373, poj1691)

5. Dynamic Planning
(1) more complex dynamic planning (such as dynamic planning to solve special operator problems)
(Poj1191, poj1054, poj3280, poj2029, poj2948, poj1925, poj3034)
(2) Dynamic Planning of record status (poj3254, poj2411, poj1185)
(3) tree-based Dynamic Planning (poj2057, poj1947, poj2486, poj3140)
6. Mathematics
(1) combined mathematics:
1. Refresh principle.
2. Drawer principle.
3. Group replacement and polyA theorem (poj1286, poj2409, poj3270, poj1026 ).
4. Recurrence relationship and primary function.

(2) mathematics.
1. Gaussian elimination method (poj2947, poj1487, poj2065, poj1166, poj1222)
2. Probability Problem. (poj3071, poj3440)
3. GCD, Extended Euclidean (Chinese Remainder Theorem) (poj3101)
(3) calculation method.
1.0/1 score planning. (poj2976)
2. The three-way method is used to solve the extreme values of a single peak (single Valley.
3. Matrix Method (poj3150, poj3422, poj3070)
4. iterative approximation (poj3301)
(4) randomization algorithm (poj3318, poj2454)
(5) Miscellaneous questions.
(Poj1870, poj3296, poj3286, poj1095)
VII. computational geometry.
(1) Coordinate discretization.
(2) scanning line algorithm (for example, finding the area and perimeter of a rectangle and using it with a line segment tree or heap ).
(Poj1765, poj1177, poj1151, poj3277, poj2280, poj3004)
(3) polygon kernel (semi-plane intersection) (poj3130, poj3335)
(4) comprehensive application of geometric tools (poj1819, poj1066, poj2043, poj3227, poj2165, poj3429)

Advanced:
I. Basic algorithm requirements:
(1) the code can be quickly written in a concise but elegant style.
(Poj2525, poj1684, poj1421, poj1048, poj2050, poj3306)
(2) ensure correctness and efficiency. poj3434
Ii. Graph Algorithm:
(1) minimum generation tree and minimum K short circuit. (poj1639)
(2) theory of the maximum short circuit, Minimum Spanning Tree, bipartite graph, and maximum flow problem (mainly modeling and solving)
(Poj3155, poj2112, poj1966, poj3281, poj1087, poj2289, poj3216, poj2446
(3) optimal rate spanning tree (poj2728)
(4) minimum tree structure (poj1_4)
(5) generate small trees.
(6) Minimum ring of undirected graph and Directed Graph
Iii. data structure.
(1) trie graph creation and application (poj2778)
(2) The LCA and rmq problems (the recent common ancestor problems) include offline algorithms (parallel query set + DFS) and online algorithms.
(Rmq + DFS). (poj1330)
(3) Dual-end queue and Its Application (maintaining a monotonous queue, often in the dynamic planning from optimization status transfer
Purpose). (poj2823)
(4) left Tree (merged heap ).
(5) suffix tree (a very useful data structure is also a hot topic in the competition area ).
(Poj3415, poj3294)
4. Search
(1) troublesome search question training (poj1069, poj3322, poj1475, poj1924, poj2049, poj3426)
(2) wide search status optimization: using M-in-number Storage status, converting to string hash table Weight Determination, bit compression storage status, bidirectional wide search, A * algorithm. (poj1768, poj1184, poj1872, poj1324, poj2046, poj1482)
(3) Optimization of Deep Search: Bit operations should be used as much as possible, pruning must be required, as few function parameters as possible, and the number of layers is not too large. You can consider bidirectional search, rotation search, and IDA * algorithms. (poj3131, poj2870, poj2286)
5. Dynamic Planning
(1) dynamic planning that requires data structure optimization.
(Poj2754, poj3378, poj3017)
(2) quadrilateral inequality theory.
(3) difficult status dp (poj3133)
6. Mathematics
(1) combined mathematics.
1. Mobius Inversion (poj2888, poj2154)
2. Partial Order relationship theory.
(2) forum discussion.
1. Extremely small processes (poj3317, poj1085)
2. Nim problems.
VII. computational geometry.
(1) Semi-plane intersection (poj3384, poj2540)
(2) create a visual image (poj2966)
(3) Minimum circular coverage of a point set.
(4) vertex (poj2079)
8. Comprehensive questions.
(Poj3109, poj1478, poj1462, poj2729, poj2048, poj3336, poj3315, poj2148, poj1263)

Initial stage:
I. Basic Algorithms:
(1) enumeration. (poj1753, poj2965) (2) greedy (poj1328, poj2109, poj2586)
(3) recursion and divide and conquer. (4) recursion.
(5) constructor. (poj3295) (6) simulation method. (poj1068, poj2632, poj1573, poj2993, poj2996)
Ii. Graph Algorithm:
(1) depth first traversal and breadth first traversal.
(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) topological sorting (poj1094)
(5) maximum matching of bipartite graphs (Hungary algorithm) (poj3041, poj3020)
(6) augmented Path Algorithm for the maximum stream (km algorithm). (poj1459, poj3436)
Iii. data structure.
(1) string (poj1035, poj3080, poj1936)
(2) sorting (fast sorting, Merge Sorting (related to the number of reverse orders), heap sorting) (poj2388, poj2299)
(3) Simple and query set applications.
(4) efficient search methods such as hash table and binary search (number hash, string hash)
(Poj3349, poj3274, poj2151, poj1840, poj2002, poj2503)
(5) Harman tree (poj3253)
(6) Heap
(7) trie tree (static and dynamic) (poj2513)
4. Simple search
(1) Deep Priority Search (poj2488, poj3083, poj3009, poj1321, poj2.pdf)
(2) breadth-first search (poj3278, poj1426, poj3126, poj3087.poj3414)
(3) simple search techniques and pruning (poj2531, poj1416, poj2676, 1129)
5. Dynamic Planning
(1) backpack problems. (poj1837, poj1276)
(2) Simple DP in the following table (refer to page149 in lrj ):
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 subsequence)
(Poj3176, poj1080, poj1159)
3. c [I, j] = W [I, j] + opt {C [I, k-1] + C [K, J]}. (optimal binary search tree problem)
6. Mathematics
(1) combined mathematics:
1. Principle of addition and multiplication.
2. Arrange and combine.
3. Recursive relationship.
(Poj3252, poj1850, poj1019, poj1942)
(2) number theory.
1. Prime Number and Division
2. hexadecimal digits.
3. Same modulus operation.
(Poj2635, poj3292, poj1845, poj2115)
(3) calculation method.
1. Knowledge about monotonic functions in the binary method. (poj3273, poj3258, poj1905, poj3122)
VII. computational geometry.
(1) geometric formula.
(2) Use of cross products and dot products (for example, determination of intersection of line segments and distance between points and line segments). (poj2031, poj1039)
(3) simple multi-edge algorithm (area calculation) and correlation determination (whether the multi-edge is in the Multi-edge type and whether the multi-edge type is intersection)
(Poj1408, poj1584)
(4) convex hull. (poj2187, poj1113)

(7)

 

Stage 1: practice common classical algorithms. Each of the following algorithms is used for 10 to 20 times, while streamlining the code by myself,
Because it is too common, you don't have to think about it when writing. You can even turn off the monitor within 10-15 minutes.
Come out.
1. Transient (Floyd, dijstra, bellmanford)
2. minimal spanning tree (write a prim first, and kruscal should use and query the set, which is hard to write)
3. Large numbers (High Precision) addition, subtraction, multiplication, and Division
4. Binary Search. (the code can be less than five lines)
5. Perform cross multiplication, determine the intersection of line segments, and then write a convex hull.
6. BFs, DFS, and skilled hash tables (be familiar, flexible, and concise)
7. mathematical formulas include: Moving and Division (within two rows), line segment intersection, and multi-angle area.
8. There are many tips for calling the system qsort.
9. Conversion between any binary systems

Stage 2: Exercise is a bit more complex, but it is also commonly used.
For example:
1. Bipartite Graph Matching (Hungary), minimum path Overwrite
2. network flow, minimum charge flow.
3. Line Segment tree.
4. Check the set.
5. Familiar with various typical dynamic planning models: LCs, longest incrementing substrings, triangle partitioning, and memory DP
6. classification algorithms. Game tree and binary method.
7. The largest group and the largest independent set.
8. points are located within the polygon.
9. Differential constraint system.
10. Bidirectional breadth search, A * algorithm, minimum dissipation first.

(8)

There is basically no need for actual projects. LSS said that there were already more points. Of course, I personally think that it is useful to judge whether a problem is NPC/nph or not, and I will not waste my experience on finding polynomial algorithms in the future. This ACM should be used, and actual projects may also be useful.

The long string posted on ACM is not enough. The so-called is not enough. First, it means that even if we do not make any mistakes, we will not establish a DP model, nor establish a graph theory model, we will be able to get stuck. Such a living thing will not be able to solve the problem. Second, this table is incomplete. Since the graph can be pulled to the optimal rate Spanning Tree, the game also needs to pull the SG theorem at least, and the string also needs to pull the AC automatic machine (not an automatic AC Machine ),

 

(9) supplement ....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.