Ideally, you&#x27;d initialise the filter with all the elements at startup. Obviously, the complexity for this is dependent on the number of elements to be added + a constant overhead for the number of hash functions k. So, for n elements, it would be O(kn) or O(n).<p>Adding elements degrades the filter and and deciding when to stop adding elements is purely down to what worse-case false positive probability you are willing to accept. The equation for this can be readily found online, but put simply, the probability p is a function not only of the number of bits in the filter&#x27;s  array, but also the number of elements already added to the set.