Data structure learning program

10.1-10.7

KMP + RMQ + suffix array

Three knowledge questions assurance 70+

10.8-10.14

Dictionary tree automata + + AC sequence

60+ title guarantee

10.15-10.23

ST+Treap+Lcp

60+ title guarantee

10.24-10.30

Split Partition chain + + tree root algorithm

50+ title guarantee

Knowledge of each scenario

Disjoint-set:

Circle of friends question

Connectivity graph

Other optimization algorithm acceleration, you can try this

Family property issues, problems and relatives

 

Fenwick tree

The most basic point range and single query modification

Interval modify Fenwick tree using the differential thoughts

Tree-dimensional array, the more difficult, and some may also be combined theorem of inclusion-exclusion

Fenwick tree seeking to reverse: reverse the general thought of using merge sort, but discrete plus Fenwick tree is a more efficient way

Tree tree arrays, collections Fenwick tree to tree, a common method for the renumbering, and record number of new jurisdictions node. When solving the sub-tree weights and still quite practical. However, this application requires the construction side, front to use the chain to star in the game experience can skip.

Fenwick tree seeking monotone sequences specified length, the monotonous upgrade request queue in reverse order. We need to exclude two equal numbers, and multiple interval is calculated in line with the number of

More often, Fenwick tree to be combined with other algorithms (such as dichotomous answers, like prefixes and optimization) in order to play the greatest power

 

Segment tree

The most basic single-point update, a single point of inquiry

Then is the update interval, the interval query

The maximum range of the sub-segments and a maximum prefix, suffix largest, the largest sub-segment and

Range of two-dimensional matrix using a two-dimensional tree line, you can do basic template title

There are a large range of data consolidation problems, then use the tree line

Interval coloring problem can be used to maintain the tree line

Scanning line problem

Different trees and tree line array is an array tree can only maintain the prefix "operations and" (prefix and prefix plot, prefix max-min), while the segment tree can range operation and maintenance.

 

RMQ

Maximum Minimum Interval problem

There are two-dimensional and one-dimensional thinking, like

RMQ also be used in conjunction with other algorithms

 

The diameter of the tree using a tree DP problem or may DFS

 

KMP

Find the smallest circulation section

Looking for the number of cycles Festival

Find longest common subsequence

There are a variety of string match

Whether the subtree binary A binary tree is a B

 

Suffix array

It issues a single string, the first suffix array configuration and array seek Height

The maximum value of the longest substring may overlap repeated questions seeking array Height

May not overlap the longest substring repeated problems, the nature of master array Height

The idea is common in sub-suffix array-related issues

Superimposable repeated k times the longest substring, generally half do, just suffix k is determined whether the current segment can occur.

Repeated substring count problem, relatively simple SA title

Ans=∑max(Height[i]−Height[i−1],0)

Not counting the same substring problem is n-sa [k] + 1-height [k] substrings.

K lexicographically first substring problem, to find half

Continuously repeated substrings problems enumerated length string S k, if Rank [1] and Rank [k + 1] is Height = | L | -k then the current legal answers.

Most of repetitions is repeated continuously substrings problems enumerated substring length k, corresponding to the length of the look LCP between each position is equal to the maximum energy spread where k is the number of times repeated.

A string occurrences problem in all string

String substring repeated k times the issue, SA + segment tree maintenance

Strings of different types of continuous sub-string problem, this should be regarded as "prefix array" it. Specifically, while SA request is to flip the string, then the resulting array is the original prefix string.

Suffix array has been my nightmare, I hope the game never quite found it.

 

Trie

String retrieval problems

Word frequency statistics problem

Longest common prefix string problem

Search prefix string matching problem

As another structure of auxiliary data structures and algorithms, such as the suffix tree, the AC automatic machine

 

AC automaton

L gives a pattern string (summed length N), large text and a length of M, the position of each pattern string extraction requirements arise from a large text. KMP complexity than the lower

N give you a template string and a text string, you ask these template strings appear in the text string up to the number of times

AC automatic machine with weights generally combined and DP.

You now infer a length S = n string composed of lowercase letters how many ways the composition, and DP binding

 

Treap

I feel that this word is used in a large number of queries on K, delete, modify, and other operations other uses have not seen

 

There are a large range of queries on K

Tree chain split

 

Modify the path in a tree, seeking extreme value, sum, this time should immediately think of tree chain split

Tree chain split sub-tree problem solving

Tree cross + segment tree can maintain that point right section of the tree, if it is the right side of the interval, then we must turn point edge.
 

Published 611 original articles · won praise 390 · Views 200,000 +

Guess you like

Origin blog.csdn.net/qq_43627087/article/details/101710024