I'm working on the Project that requires to create a hash table and link it with a skip list. The Project is to develop a reservation system for an airline, using a skip list to maintain flight information and a hash table to maintain passenger/reservation information.
Hash table uses passenger names as a key.
My hash func is: int FltReservations::hash (const string& key) const { int hashVal = 0; for (int i = 0; i < key.length(); i++) hashVal = hashVal * 37 + key ;
I think that the hash table I should create is chained hash table, but I have no idea how to link it with the skip list that has flight numbers and the capacity of each flight. I'm suppose to keep track of two lists, one for the booked passengers and one for the waiting list passengers.
How do I link this information with the hash table? Would each node have two skip lists link to it? Or one list?
Please someone help me. I've searched C++ books but I could not find any similar example anywhere. Thank you, Lily