Skip to content

Maddesea/HashMap-Implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HashMap-Implementation

Welcome to my HashMap-Implementation project!

This project is a computer science project that focuses on the implementation of data structures and algorithms. The main goal of the project is to showcase understanding of data structures by implementing a HashMap using the separate chaining (SC) and Open Addressing with Quadratic Probing method to handle collisions.

The project was provided with skeleton code, including basic hashing functions, a dynamic array and a singly-linked-list data structure. I implemented several functions to complete the HashMap, including:

empty_buckets(): returns number of empty buckets table_load(): returns the load factor of HashMap clear(): removes all elements from the HashMap put(): adds a key-value pair to the HashMap contains_key(): returns a Boolean indicating whether key is in HashMap get(): returns value associated with key or null remove(): removes key-value pair associated with key resize_table(): resizes HashMap when load factor exceeds threshold get_keys(): returns a list of all keys in HashMap

The project was part of a Data Structures course, it aimed to test my understanding of HashMap, separate chaining, open addressing with Quadratic Probing, load factor, collisions and how to handle them. Additional information can be found in the prompt file OSU CS261 A6 - F22.pdf. Feel free to check out the code and let me know if you have any questions or suggestions.

About

Oregon State University - CS261 - Portfolio Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages