Hyperloglog, Probability, Hash Function, Cardinality Estimation, Dynamic Programming.
Generate k random strings data = list(set([''.join(\ random.choices(string.ascii_lowercase + string.digits, k=random.randint(1, 20))) for _ in range(k)])) # True cardinality print(len(data)) g = [-1]*m for i in range(10*k): h = random.sample(data, 1)[0] for j in range(m): # generate hash between 0