Ask HN: What are some cool but obscure data structures you know about?
738 by Uptrenda | 353 comments .
I'm very interested in what types of interesting data structures are out there HN. Totally your preference. I'll start: bloom filters. Lets you test if a value is definitely NOT in a list of pre-stored values (or POSSIBLY in a list - with adjustable probability that influences storage of the values.) Good use-case: routing. Say you have a list of 1 million IPs that are black listed. A trivial algorithm would be to compare every element of the set with a given IP. The time complexity grows with the number of elements. Not so with a bloom filter! A bloom filter is one of the few data structures whose time complexity does not grow with the number of elements due to the 'keys' not needing to be stored ('search' and 'insert' is based on the number of hash functions.) Bonus section: Golomb Coded Sets are similar to bloom filters but the storage space is much smaller. Worse performance though.
Subscribe to:
Post Comments (Atom)
New best story on Hacker News: Canada plans 'nuclear renaissance' with up to 10 reactors built by 2040
Canada plans 'nuclear renaissance' with up to 10 reactors built by 2040 507 by geox | 349 comments on
-
macOS unable to open any non-Apple application 769 by mattsolle | 467 comments on News.
-
SubEthaEdit 5 is now free and open source 357 by schwuk | 29 comments on
-
Qualcomm and Apple agree to drop all litigation 467 by saeedjabbar | 122 comments on News.
No comments:
Post a Comment