'''simple docstring'''




from collections import deque

from .hash_table import HashTable






class 							a__(   lowerCAmelCase__      ):


			'''simple docstring'''






			def __init__(  self			,       *__lowerCAmelCase			,       **__lowerCAmelCase):




					"""simple docstring"""


					super().__init__(*__lowerCAmelCase			,       **__lowerCAmelCase)



			def 				a_			(  self			,       __lowerCAmelCase			,       __lowerCAmelCase):




					"""simple docstring"""


					lowerCAmelCase     =    deque([]) if self.values[key] is None else self.values[key]
					self.values[key].appendleft(__lowerCAmelCase)
					lowerCAmelCase     =    self.values[key]



			def 				a_			(  self):




					"""simple docstring"""


					return (
					    sum(self.charge_factor - len(__lowerCAmelCase) for slot in self.values)
					    / self.size_table
					    * self.charge_factor
					)







			def 				a_			(  self			,       __lowerCAmelCase			,       __lowerCAmelCase=None):




					"""simple docstring"""


					if not (
					    len(self.values[key]) == self.charge_factor and self.values.count(__lowerCAmelCase) == 0
					):
							return key
					return super()._collision_resolution(__lowerCAmelCase			,       __lowerCAmelCase)





'''simple docstring'''




def 							snake_case__				(     _A:   int					)       ->      list[int]:

		'''simple docstring'''


		if length <= 0 or not isinstance(_A ,  _A					):
				raise ValueError("""Length must be a positive integer."""					)
		return [n * (2 * n - 1) for n in range(_A					)]


if __name__ == "__main__":
						print(hexagonal_numbers(length=5))
						print(hexagonal_numbers(length=1_0))




