Unreal people database for testing the separate chained
hash table with AVLTree chain. In the tests
86.195.895 people is generated in people file by
database_generator.py.
All ids and phone numbers are unique.
An id is chosen by chance and tried to find in both linear
separate chaining and AVLTree separate chaining.
AVL Tree: 0.000025 seconds in average
Linear: 0.066093 seconds in average
It work better than O(logn) where n is number of items. After getting the index with hash function, m items will be in this index where m is less than or equal to n. (It is usually much smaller, but never more). O(1) for hashing and O(logm) for searching in AVLTree. This is faster than binary search for sorted data.
AVL Tree Result:
![avl result]
(https://github.com/boranyldrm/HashTable/blob/master/AVLresults.png?raw=true)
boranyldrm / hashtable Goto Github PK
View Code? Open in Web Editor NEWSeparate chaining with AVL Tree