algorithm learning

/**The first stage: practice classic common algorithms, each of the following algorithms will be marked ten to twenty times for me, and at the same time simplify the code by myself,

Because it is too commonly used, so you don't have to think about it when you practice writing, you can type it out within 10-15 minutes, or even turn off the monitor to type out the program.

1. Shortest path (Floyd, Dijstra, BellmanFord)

2. Minimum spanning tree (write a prim first, kruscal uses a union check set, it is not easy to write)

3. Large numbers (high precision) addition, subtraction, multiplication and division

4. Binary search. (The code can be within five lines)

5. Cross product, judge the intersection of line segments, and then write a convex hull.

6. BFS, DFS, and proficient in hash tables (familiar, flexible, and simple in code)

7. Mathematically, there are: tossing and dividing (within two lines), intersection of line segments, area formula of polygons.

8. Calling the system's qsort, there are many skills, master it slowly.

9. Conversion between arbitrary bases

*/

Stage 2: Practice more complex, but also more commonly used algorithms.

Such as:

1. Bipartite graph matching (Hungary), minimum path coverage

2. Network flow, minimum cost flow.

3. Line segment tree.

4. And check the set.

5. Familiar with the typical dynamic programming: LCS, longest increasing substring, triangulation, memoized dp

6. Game algorithm. Game tree, binary method, etc.

7. The largest group, the largest independent set.

8. Determine that the point is within the polygon.

9. Differentially constrained systems.

10. Bidirectional breadth search, A* algorithm, minimum dissipation priority.

 

 

relevant knowledge

 

Graph Theory

 

  path problem

        0/1 edge weight shortest path

        BFS

        Non-negative edge weight shortest path (Dijkstra)

            Features that can be solved with Dijkstra

        Negative edge weight shortest path

        Bellman-Ford

            Bellman-Ford's Yen-Optimization

            Differential Constraint System

        Floyd

            generalized path problem

            transitive closure

            Minimax Distance / Minimax Distance

        Euler Path / Tour

            loop-and-loop algorithm

            Euler Path/Tour for Hybrid Graphs

        Hamilton Path / Tour

            Hamilton Path / Tour construction for special graphs

 

    spanning tree problem

        minimum spanning tree

        kth smallest spanning tree

        optimal ratio spanning tree

        0/1 Score Planning

        Degree-constrained spanning tree

 

    connectivity issues

        Powerful DFS algorithm

        undirected graph connectivity

            cut point

            cut edge

            two connected branches

            Directed graph connectivity

            Strongly connected branch

            2-SAT

            minimum point basis

 

    Directed Acyclic Graph

        topological sort

            The relationship between directed acyclic graph and dynamic programming

 

    Bipartite graph matching problem

        The idea of ​​conversion between general graph problem and bipartite graph problem

        Maximum match

            Minimum path coverage for directed graphs

            Minimal Coverage of 0/1 Matrix

        perfect match

        best match

        stable marriage

 

    network flow problem

        Simple Characteristics of Network Flow Models and Relation to Linear Programming

        Maximum flow min-cut theorem

        maximum flow problem

            Maximum flow problem with upper and lower bounds

                circulating flow

        Min-Fee Max-Flow / Max-Fee Max-Flow

 

    Properties and Judgments of Chord Diagrams

 

 

Combinatorial Mathematics

 

    Common ideas for solving combinatorial math problems

        Approach

        recursive/dynamic programming

    probability problem

        Polya's Theorem

 

 

Computational Geometry / Analytical Geometry

 

    The Heart of Computational Geometry: Cross Product / Area

    The Workhorse of Analytic Geometry: Complex Numbers

 

    basic form

        point

 &n

...

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326684593&siteId=291194637