MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

data_structures/hashing/hash_table.py:12–23  ·  view source on GitHub ↗
(
        self,
        size_table: int,
        charge_factor: int | None = None,
        lim_charge: float | None = None,
    )

Source from the content-addressed store, hash-verified

10 """
11
12 def __init__(
13 self,
14 size_table: int,
15 charge_factor: int | None = None,
16 lim_charge: float | None = None,
17 ) -> None:
18 self.size_table = size_table
19 self.values = [None] * self.size_table
20 self.lim_charge = 0.75 if lim_charge is None else lim_charge
21 self.charge_factor = 1 if charge_factor is None else charge_factor
22 self.__aux_list: list = []
23 self._keys: dict = {}
24
25 def keys(self):
26 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected