> 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.
In the case of IPs, you just have to make 4 comparisons (for IPv4), if you store them in a tree.
In the case of IPs, you just have to make 4 comparisons (for IPv4), if you store them in a tree.