Algorithm and data structure--Introduction summary and self-study material recommendation

Source: Internet
Author: User

first, the outline Blog: Dong Xi, Vamei Mind Mapping: http://pan.baidu.com/s/1gdCqW8r second, data structure data recommendation Array : Find Fast O (1), insert delete slow O (n) Linked list : Find slow O (n), insert delete quick O (1) block list: Find insert Delete o (sqrt (n)); array + linked list; Queue: Advanced First Out Stack: Advanced Back out dual-ended queues: The queue and Stack, with the head and tail array, the first team tail can be added and deleted. Hash Table
    • The mapping of collection A to set B;
    • hash function: MD5, SHA;
    • Application: File comparison, password storage;
    • Collision Resolution: Open hashing-linked list; closed hashing, array subscript move to empty (rehashing move to a larger new array) hash table
Bit-map: A bit represents a number, such as 10bit can represent 1~10 bitmap two fork heap/heap: Height is (lg^2) n, array data 2 minimum heap: Each parent node is smaller than the child node dictionary tree (prefix tree): Suitable for string retrieval, longest string common prefix, sort data by dictionary insert, find O (n): n is string length, Space O (26^n) suffix Tree: Suitable for complex string manipulation suffix Tree Group: Suitable for complex string manipulation two fork Find tree: The complexity of adding and deleting is equal to the depth, the depth is N, at least the log (n) sequence, will degenerate into a linear table, that is, only one. If the delete node has both left and right nodes at the time of deletion, replace it with the maximum value of the left subtree of the delete node or the minimum value of the child tree. B-Tree: Performance is always equal to two, there is no balance problem. B + Tree: Suitable for file indexing system, only hit on leaf node. b* Tree: Increase the space utilization by increasing the sibling pointer on the B + tree basis AVL: Balanced binary tree, depth of O (LGN), sub-tree depth difference not exceeding 1, single rotation and double rotation data minimum depth Math.ceil (log (2) (n+1)) treap: Heap tree, performance is between ordinary binary tree and AVL red and black trees: Statistical performance than AVL good data splay Tree: Stretching the tree, each search will be rotated once, the search frequency of the nodes will be rotated to the root node. M-Time Search complexity O (MLGN) Segment Tree: efficiently asking and modifying information about a range in a series tree-like array: Tree arrays convert linear structures to pseudo-tree structures (linear structures can only scan elements individually, while tree-like structures allow for jumping scans), making the modification and summation complexity both O (LGN) Figure: Representation of graphs: two-dimensional arrays, adjacency tables and check Set: It is often used as a storage structure for another complex data structure or algorithm. Common applications are: the number of connected components for undirected graphs, the recent public ancestor (LCA), the job sequencing with restrictions, the implementation of the Kruskar algorithm to find the minimum spanning tree. third, the algorithm data recommendation Basic ideas: Dynamic programming, pruning, backtracking sorting: quick sorting, merge sorting, heap sorting, bucket sorting, seven sort comparison strings: KMP, KMP, KMP number theory: Arranging the combined tree: traversal : Each node is checked forFirst Order traversal: top, left, and rightMiddle Sequence traversal: Left, top, rightPost-post traversal: Left, right, topDepth-First search Dfs through the stack to achieve breadth-first search BFS through the queue to achieve * image from the network ~>_<~

Algorithm and data structure--Introduction summary and self-study material recommendation

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.