problem-solving-javascript icon indicating copy to clipboard operation
problem-solving-javascript copied to clipboard

[HO] Write test cases for Bloom Filters

Open ashokdey opened this issue 2 years ago • 5 comments

Write test cases for the data structure Bloom Filters

ashokdey avatar Oct 01 '22 08:10 ashokdey

Please assign me

ekramzafar avatar Oct 15 '23 14:10 ekramzafar

Go ahead @ekramzafar

ashokdey avatar Oct 16 '23 08:10 ashokdey

Thanks

ekramzafar avatar Oct 16 '23 10:10 ekramzafar

In this code the issue is very less but some issues are arises like

a bit array instead of an array of 0s and 1s to store the data. This will reduce the space complexity and improve the performance of setting and getting bits. You can use a library like [bit-array] or [bitwise] to implement a bit array in JavaScript.

a universal hashing scheme instead of three fixed hash functions. This will reduce the probability of false positives and allow you to adjust the number of hash functions according to the size of the filter and the expected number of elements. You can use a library like [hash.js] or [murmurhash-js] to implement universal hashing in JavaScript.

You can add a counting feature to your bloom filter, which will allow you to remove elements from the filter as well as adding them. This will make your filter more dynamic and flexible. You can use a library like [counting-bloom-filter] or [bloom-filter-js] to implement a counting bloom filter in JavaScript.

ekramzafar avatar Oct 16 '23 18:10 ekramzafar

I hope it's helpful

ekramzafar avatar Oct 16 '23 18:10 ekramzafar