Unlike in Java or Python, C has a very limited standard library which lacks general collections/data structures. This means that, if you need a particular structure, you'll need to either include an external library, or implement it yourself. In this project, you'll write a very useful data structure called a hash map, which will be useful to you in future assignments. As a starting point, download and extract this tarball. It includes the following basic directory structure,

.
|-- include
|   |-- hashfuncs.h
|   `-- strmap.h
|-- src
|   `-- strmap.c
`-- tests
    `-- strmap_tests.c

The interfaces that you must implement are defined in include/strmap.h. DO NOT EDIT THIS FILE. You should implement this functions, along with any internal helper functions or structures you may want to add, in src/strmap.c. I've provided a suite of unit tests to verify the functionality of your data structure in tests/strmap_tests.c. DO NOT EDIT THIS FILE either.

Specific Tasks

For this project, you must complete the following tasks

Submission

Create a tarball containing the following files,

project-1
|-- Makefile
|-- include
|   |-- hashfuncs.h
|   `-- strmap.h
|-- src
|   `-- strmap.c
`-- tests
    `-- strmap_tests.c

and upload it to Canvas by the deadline. Do not alter the provided include or unit test files.

Tips and Advice

Errata