Overview of data structure java

The data structure may be divided into three structures:

Linear structure:

Array; stack; queue; list; hashtable

 

Tree:

Binary tree, binary search trees, AVL, red-black tree, Treap, Splay, heap, Trie, tree line, KD tree, disjoint-set, Huffman

 

Figure structure

Adjacency matrix, the adjacency list

 

We need Depending on the application, the flexibility to choose the most appropriate data structure,

 

example:

1, the database,

It has a good package, use the SQL language can use the database,

SELECT * FROM Mu-class network

WHERE interest = "data structure"

 

Which the most important is the use of a tree structure: AVL, red-black tree, Treap, splay trees, B tree,

Another very important hash table

 

2, the operating system

It involves a lot of data structure, an example of multi-task switching, to:

System stack, you need a recursive call stack system

Priority Queue: heap. With the priority queue, the operating system can quickly compare their priorities between multiple tasks to achieve the task switching

 

3, file compression

Not just RAR, computer PNG, MP3, PDF files are different for a certain amount of compression,

The most basic compression algorithm used is Huffman tree,

Huffman tree is very simple, and now the software has not

 

4, contacts,

List was used, but the contact is very long, slow look special,

This last issue is resolved intern, it is simple,

Trie, the prefix tree.

In this way, look for any person who is in ms level contacts, no matter how much contact

 

Large number of algorithms, data structures as the cornerstone

For example, the game's pathfinding algorithms, graph theory algorithms,

DFS depth-first traversal: Using the stack,

BFS breadth-first traversal: Use queue

 

Algorithms + data structures = programs

Guess you like

Origin www.cnblogs.com/horizcool/p/11122059.html