Question: 1 Purpose The high - level goal of this assignment is to help you build up a mental model of what is happening inside the
Purpose
The highlevel goal of this assignment is to help you build up a mental model of what is happening inside the machine when your code is executed. You will gain experience with several key aspects of and system programming:
Implementing a utility independent of any particular application progam ie you will not write, and must not assume anything about the main program and designing and implementing test cases for your implementation.
Using pointers in data structures, both in general and in storing string character sequence values.
Dynamic memory management, using malloc and free.
Separate compilation units.
Overview
A hash map or hash table is a data structure that stores keyvalue pairs. That is the programming interface to the data structure provides two primary methods:
Bind a value usually of a particular type to a particular key, which is always a value of a particular type.
Get the value bound to a given key, if any.
Thus a hash map acts like an associative array. Many highlevel programming languages offer similar data abstractions as a builtin facility; C does not. Names referring to such abstractions are "map", "dictionary" and "keyvalue store". Our implementation approach will yield approximately constant access time, provided the usage pattern satisfies certain assumptions.
For this assignment, the keys will be C strings nullterminated arrays of char and values will be of type void The latter type is used in C as a generic "container" for pointer values when their type
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
