Storage mechanism using quadratic probing hash keys.  
More...
#include <cmath>
#include <iostream>
#include <vector>
|  | 
| using | quadratic_probing::Entry = Entry | 
|  | 
|  | 
| int | quadratic_probing::notPresent | 
|  | 
| std::vector< Entry > | quadratic_probing::table | 
|  | 
| int | quadratic_probing::totalSize | 
|  | 
| int | quadratic_probing::tomb = -1 | 
|  | 
| int | quadratic_probing::size | 
|  | 
| bool | quadratic_probing::rehashing | 
|  | 
Storage mechanism using quadratic probing hash keys. 
- Author
- achance6 
- 
Krishna Vedala 
- Note
- The implementation can be optimized by using OOP style. 
◆ main()
Main function 
- Returns
- None 
  246           {
  247    int cmd = 0, 
hash = 0, key = 0;
 
  248    std::cout << 
"Enter the initial size of Hash Table. = ";
 
  251    bool loop = true;
  252    while (loop) {
  262        switch (cmd) {
  263            case 1:
  267                break;
  268            case 2:
  272                break;
  273            case 3: {
  278                        key, true)];
  279                if (entry.
key == quadratic_probing::notPresent) {
 
  281                }
  282                break;
  283            }
  284            case 4:
  285                std::cout << 
"Enter element to generate hash = ";
 
  289                break;
  290            case 5:
  292                break;
  293            default:
  294                loop = false;
  295                break;
  296                
  297        }
  299    }
  300    return 0;
  301}
void * hash(const std::string &message)
Converts the string to bytestring and calls the main algorithm.
Definition: md5.cpp:287
size_t hashFxn(int key)
Definition: quadratic_probing_hash_table.cpp:46
void addInfo(int key)
Definition: quadratic_probing_hash_table.cpp:207
void display()
Definition: quadratic_probing_hash_table.cpp:142
void removalInfo(int key)
Definition: quadratic_probing_hash_table.cpp:222
int quadraticProbe(int key, bool searching)
Definition: quadratic_probing_hash_table.cpp:56
Definition: quadratic_probing_hash_table.cpp:37
int key
key value
Definition: quadratic_probing_hash_table.cpp:39