Class: DataStructures101::ChainedHashTable
- Inherits:
-
Hash::BaseHashTable
- Object
- Hash::BaseHashTable
- DataStructures101::ChainedHashTable
- Defined in:
- lib/data_structures_101/chained_hash_table.rb
Overview
HashTable implementation using separate chaining strategy for collision-resolution It subclasses Hash::BaseHashTable
Instance Attribute Summary
Attributes inherited from Hash::BaseHashTable
#capacity, #compression_lambda, #size
Instance Method Summary collapse
-
#initialize(capacity: 31, prime: 109_345_121, compression_lambda: nil) ⇒ ChainedHashTable
constructor
A new instance of ChainedHashTable.
Methods inherited from Hash::BaseHashTable
#[], #[]=, #delete, #each, #insert
Constructor Details
#initialize(capacity: 31, prime: 109_345_121, compression_lambda: nil) ⇒ ChainedHashTable
Returns a new instance of ChainedHashTable.
10 11 12 |
# File 'lib/data_structures_101/chained_hash_table.rb', line 10 def initialize(capacity: 31, prime: 109_345_121, compression_lambda: nil) super end |