Searching numerous ranges without using a linear search
Hello,
Hope this is the correct forum for this question:
I am putting a database table into a hashmap, and the table columns are set up as such:
5 digit number, lower bound, upper bound, other data
The key is composite made up of the 5 digit number(5dn), and lower bound since there can be multiple ranges for a given 5dn.
With a known value associated for a given 5dn I need to search through all of the ranges related to the 5dn and determine which range the known value falls into.
Is there a way to sift through all of these ranges without performing a linear search? Can I set up a hash map using some key? Speed and efficiency is a priority, but is it possible with how the table is set up? THanks!

