This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Hash table with open addressing. | |
* | |
* <p>This contains some common methods of Map interface, including size, isEmpty, put, get, remove, | |
* containsKey | |
* | |
* <p>For open addressing hash table, we use 100% of the inner array space, and it is a close | |
* hashing. When collision occurs, it has to find an empty position to store the element. Pedro | |
* provided few methods to probe a new index. I am not quite familiar with quadratic probing, so the | |
* default probing method is linear probing, which means if the index is occupied, it automatically |