Ending discrimination data structure

1. The similarities and differences between the stacks and queues

The same point stack queue: 

1 . Are linear structures. 

2 . Insert operations are defined in the end of the table. 

3 . Configuration can be achieved by sequentially and chain structure. , 

4 . Insertion and deletion time complexity is O ( . 1 ), both on the same spatial complexity. 

5 . Stacks and multi-chain multi-chain may be the same queue management. 

Different stacks and queues: 

1 . Different positions delete data elements, delete operations stack end of the table, delete queue in the header. 

2 Different scenarios; common stack scenario involves solving problems brackets, conversion and expression evaluation, and recursive function calls, depth-first search traversal; queue common application scenarios include a variety of computer system resources management, message buffer management and breadth-first search traversal. 

3 . Stack order to achieve multi-stack space sharing, but not the queues. 

4 . Last-out stack, FIFO queue

2. The logical structure of the data structure

1, set: in addition to "belong to a set of" outside the relationship, no other relationships between elements in a data structure; 

2, linear structure: to-one correlation between the data structure elements; 

3, the tree structure : there is a correlation in many of the data structure elements; 

4, graph structure: there is a correlation-many data structure element

 

 

  3 similarities and differences between ordinary tree and binary tree

Different: 

a node (1) has at most two sub binary tree, the tree is not the case;
subtree of a node (2) left and right points of the binary tree, the tree and the subtrees without order.


Synonym:
and only a node with node called;
binary tree with the recursive nature of the same.

  4. Dynamic and static lookup to find the similarities and differences

Dynamic lookup table to insert an element in the process of finding or remove elements from the lookup table 
static lookup tables just to find a specific element or retrieve the properties of a particular element of 
the most popular explanation: dynamic lookup table can modify the look-up table structure, and static lookup table only Inquire

  Different traversal 5. FIG.

Depth-first search and breadth-first search. They are suitable for undirected graphs and directed graphs.

  

Guess you like

Origin www.cnblogs.com/hoganhome/p/12093030.html