Symbol Table Summary

Table 1. Symbol comparison algorithm

algorithm insert Seek Are Ordered
Unordered list implementation of the symbol table N N yes
Binary search orderly realization of the symbol table N calm yes
Binary search tree calm calm yes
2-3 search tree calm calm yes
Zipper method to achieve the hash table N/M N/M no
Linear detection method implemented hash table 1 1 no

Priority should be given a hash table, using a red-black tree when needed and orderly operation.

2. Java symbol table implementation

  • java.util.TreeMap: red-black tree

  • java.util.HashMap: hash zipper law

Original Address

Guess you like

Origin www.cnblogs.com/aiguozou/p/11460983.html