Hyperloglog, Probability, Hash Function, Cardinality Estimation, Dynamic Programming.
If we store all that data in memory, we need to have at-least 4864 RAMs each of 16GB and since memory is expensive than storing on disk, this option seems infeasible at the moment. Alternatively, we can use a ‘set’ data structure to store the stream of user ids. The set could be implemented using