Skip to content

Conversation

@koushik-sai
Copy link
Contributor

Description

This pull request adds an immutable HashMap implementation using separate chaining.

Key Features

  • Generic key and value support
  • Immutable design: no modification of existing instances
  • All update operations return a new ImmutableHashMap
  • Thread-safe by design due to immutability

Implementation Details

  • Uses separate chaining for collision handling
  • Does not modify or extend existing Map or HashMap implementations
  • Handles null keys safely
  • Added with minimal impact to existing codebase

Notes

  • Designed for educational and algorithmic clarity
  • Fully compatible with strict compiler settings (-Werror)

@codecov-commenter
Copy link

codecov-commenter commented Dec 24, 2025

Codecov Report

❌ Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.91%. Comparing base (48e02b3) to head (2c3a22d).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...tastructures/hashmap/hashing/ImmutableHashMap.java 92.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7183      +/-   ##
============================================
+ Coverage     78.90%   78.91%   +0.01%     
- Complexity     6858     6875      +17     
============================================
  Files           771      773       +2     
  Lines         22688    22722      +34     
  Branches       4457     4461       +4     
============================================
+ Hits          17901    17931      +30     
- Misses         4072     4074       +2     
- Partials        715      717       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants