Question: This question is based on the assignment on hash. struct node { int num; int freq; / / number of times the given num has
This question is based on the assignment on hash.
struct node
int num;
int freq; number of times the given num has occurred
node next;
;
class hasharray
node begin;
public:
hasharray;
void insertint ;
Using the above declaration you need to write the following
a insert function Traverse the linked list. If you find the "num" existing increase the frequency else add the "num" at the end of linked list.
b main function Declare the array, read an integer, generate the hash key, and call the insert function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
