Question: c++ Class Time #include-hashNode.hpp. class hashMap f hashNode map; int numkeys; II number of keys in the hashnap int mapSize; /I size of the map
Class Time #include-hashNode.hpp. class hashMap f hashNode map; int numkeys; II number of keys in the hashnap int mapSize; /I size of the map public: hashMap): void addkeyValue(string k, string v); int HashFunc(string k); // hash function nt collisionFunc(int h, int i, string k); /Icollision function ant Findkey(string k); //finds the key in the map and returns its index. 1f it's not in the array, returns -1 is written (returning an 2) declaration for a hashMap, and assuming both the HashFunction (6 pts) Given the above class int) and the collisionFunction is writtenf so that it returns an int), the HashMap (already written) is initialized to mapSize and every node in the map is initially set to NULL, write the findKey method: 3) (6 pts) In a binary heap (array-form), write the function for inserting a new integer. You may assume that the binary heap is part of a heap class that has a size field, which holds the number of integers in the heap, and an array of integers that is the heap. For simplicity's sake, you may also assume that the array is bigger than size+1. void Heap: :insert(int x) (
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
