Storing a bucket of numbers in an efficient data structure
Posted
by BlitzKrieg
on Stack Overflow
See other posts from Stack Overflow
or by BlitzKrieg
Published on 2010-04-09T22:04:27Z
Indexed on
2010/04/09
22:13 UTC
Read the original article
Hit count: 279
I have a buckets of numbers e.g. - 1 to 4, 5 to 15, 16 to 21, 22 to 34,.... I have roughly 600,000 such buckets. The range of numbers that fall in each of the bucket varies. I need to store these buckets in a suitable data structure so that the lookups for a number is as fast as possible.
So my question is what is the suitable data structure and a sorting mechanism for this type of problem.
Thanks in advance
© Stack Overflow or respective owner