Question: Write in c++ language a struct Student that has member variables: (string) first name, (int) age and (double) fee. Implement separate chaining technique for hash
Write in c++ language a struct Student that has member variables: (string) first name, (int) age and (double) fee. Implement separate chaining technique for hash tables whose each node has a data component an instance of the struct Student. Comparison of the nodes must be made with respect to age. Write the following functions using age as a key: (i) insert items; (ii) print hash tables; (iii) delete items. Implement the following using age as the key and table size 7 (you can hard code all the inputs): (i) insert five elements to hash table: (s1, 25, 20.25), (s2, 19, 25.17), (s3, 18, 16.72), (s4, 11, 17.35), (s5, 32, 18.43); (ii) print the hash table; (iii) remove an element from the has table (s2, 19, 25.17); (iv) print the hash table.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
