News for hackers. Stuff that matters.
Re:Computer Scientists Invent an Efficient New Way to Count by kuldeepmeel on Saturday May 18, 2024 @03:46AM (#40397175)
The following is also not correct.

    if k not in mem:
        mem += [k]
    if k in mem:      # not the same than "else" here
        if np.random.rand() > p:
            mem.remove(k)
Your final solution is indeed correct, and I think more elegant than what we had in our paper [I am one of the authors].

There are no comments on this comment yet.