Class: DataStructures101::ChainedHashTable

Inherits:
Hash::BaseHashTable show all
Defined in:
lib/data_structures_101/chained_hash_table.rb

Overview

HashTable implementation using separate chaining strategy for collision-resolution It subclasses Hash::BaseHashTable

Author:

  • Rene Hernandez

Since:

  • 0.2

Instance Attribute Summary

Attributes inherited from Hash::BaseHashTable

#capacity, #compression_lambda, #size

Instance Method Summary collapse

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.

Since:

  • 0.2



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