Skip to content

About

Lightweight C HashMap implementation with example usage and a simple test harness.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HashMap Implementation in C

This project implements a simple hash map in C using separate chaining to handle collisions. It provides basic operations such as creating the map, inserting key-value pairs, removing entries, checking whether a key exists, displaying the contents, and freeing memory.

Features

  • Create a hash map
  • Insert key-value pairs
  • Remove entries by key
  • Check whether a key already exists
  • Display all stored entries
  • Clean up allocated memory

Project Files

  • hashMap.c - Contains the hash map implementation
  • header.h - Defines the node structure, hash map structure, and function prototypes
  • main.c - Demonstrates basic usage of the hash map

Build and Run

Compile the program with:

gcc main.c hashMap.c -o program

Run it with:

./program

On Windows, you can also run the generated executable:

program.exe

Example Behavior

The sample driver inserts a few key-value pairs, displays them, removes some entries, and then clears the memory.

About

Lightweight C HashMap implementation with example usage and a simple test harness.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages