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 (2707da2) to head (55442a0).

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     6864     6875      +11     
============================================
  Files           772      773       +1     
  Lines         22697    22722      +25     
  Branches       4459     4461       +2     
============================================
+ Hits          17908    17931      +23     
- Misses         4073     4074       +1     
- Partials        716      717       +1     

☔ 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.

@DenizAltunkapan DenizAltunkapan enabled auto-merge (squash) December 27, 2025 16:52
@DenizAltunkapan DenizAltunkapan merged commit 51335cc into TheAlgorithms:master Dec 27, 2025
7 checks passed
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.

3 participants